Skip to content

Commit b4b2e9f

Browse files
committed
Add final report saying which packages failed.
1 parent 6da48dc commit b4b2e9f

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

scripts/run_saucelabs.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,17 @@ async function runKarma(testFile, testDescription) {
147147
* of all child processes. This allows any failing test to result in a CI
148148
* build failure for the whole Saucelabs run.
149149
*/
150-
async function runNextTest(maxExitCode = 0) {
150+
async function runNextTest(maxExitCode = 0, results = {}) {
151151
// When test queue is empty, exit with code 0 if no tests failed or
152152
// 1 if any tests failed.
153-
if (!testFiles.length) process.exit(maxExitCode);
153+
if (!testFiles.length) {
154+
for (const fileName in results) {
155+
if (results[fileName] > 0) {
156+
console.log(`FAILED: ${fileName}`);
157+
}
158+
}
159+
process.exit(maxExitCode);
160+
}
154161
const nextFile = testFiles.shift();
155162
let exitCode;
156163
try {
@@ -159,7 +166,10 @@ async function runNextTest(maxExitCode = 0) {
159166
console.error(chalk`{red [${nextFile}] ERROR: ${e.message}}`);
160167
exitCode = 1;
161168
}
162-
runNextTest(Math.max(exitCode, maxExitCode));
169+
runNextTest(Math.max(exitCode, maxExitCode), {
170+
...results,
171+
[nextFile]: exitCode
172+
});
163173
}
164174

165175
runNextTest();

0 commit comments

Comments
 (0)