mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore(flaky): save build result (#4819)
This commit is contained in:
parent
608b15f20d
commit
763e3901d9
@ -215,7 +215,10 @@ const utils = module.exports = {
|
|||||||
result: test.result,
|
result: test.result,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
testRunner.on('finished', () => dashboard.uploadAndCleanup());
|
testRunner.on('finished', async({result}) => {
|
||||||
|
dashboard.setBuildResult(result);
|
||||||
|
await dashboard.uploadAndCleanup();
|
||||||
|
});
|
||||||
|
|
||||||
function generateTestIDs(testRunner) {
|
function generateTestIDs(testRunner) {
|
||||||
const testIds = new Map();
|
const testIds = new Map();
|
||||||
|
@ -48,6 +48,10 @@ class FlakinessDashboard {
|
|||||||
this._build._tests.push(test);
|
this._build._tests.push(test);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setBuildResult(result) {
|
||||||
|
this._build._result = result;
|
||||||
|
}
|
||||||
|
|
||||||
async uploadAndCleanup() {
|
async uploadAndCleanup() {
|
||||||
console.log(`\n${YELLOW_COLOR}=== UPLOADING Flakiness Dashboard${RESET_COLOR}`);
|
console.log(`\n${YELLOW_COLOR}=== UPLOADING Flakiness Dashboard${RESET_COLOR}`);
|
||||||
const startTimestamp = Date.now();
|
const startTimestamp = Date.now();
|
||||||
@ -99,6 +103,7 @@ async function saveBuildToDashboard(dashboardPath, build) {
|
|||||||
throw new Error('Unrecognized dashboard format!');
|
throw new Error('Unrecognized dashboard format!');
|
||||||
data.builds.push({
|
data.builds.push({
|
||||||
version: DASHBOARD_VERSION,
|
version: DASHBOARD_VERSION,
|
||||||
|
result: build._result,
|
||||||
timestamp: build._timestamp,
|
timestamp: build._timestamp,
|
||||||
url: build._url,
|
url: build._url,
|
||||||
commit: build._commit,
|
commit: build._commit,
|
||||||
@ -115,6 +120,7 @@ class Build {
|
|||||||
this._url = url;
|
this._url = url;
|
||||||
this._commit = commit;
|
this._commit = commit;
|
||||||
this._tests = tests;
|
this._tests = tests;
|
||||||
|
this._result = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user