Skip to content

Commit 65aad5d

Browse files
elliotttJakeChampion
authored andcommitted
Fix the error code from the wpt runner
1 parent 413e4a7 commit 65aad5d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/wpt-harness/run-wpt.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ async function run() {
168168
console.log(`Running ${testPaths.length} of ${totalCount} tests ...\n`);
169169

170170
let expectationsUpdated = 0;
171+
let unexpectedFailure = false;
171172

172173
let stats = await runTests(testPaths, viceroy,
173174
(testPath, results, stats) => {
@@ -199,6 +200,8 @@ async function run() {
199200
console.log(`Removing expectations file ${expectPath}`);
200201
rmSync(expectPath);
201202
expectationsUpdated++;
203+
} else {
204+
unexpectedFailure = true;
202205
}
203206
} else {
204207
console.log(`EXPECTED ERROR: ${testPath} (${stats.duration}ms)`);
@@ -213,7 +216,7 @@ async function run() {
213216

214217
if (config.tests.updateExpectations) {
215218
console.log(`Expectations updated: ${expectationsUpdated}`);
216-
} else if (stats.unexpectedFail + stats.unexpectedPass != 0) {
219+
} else if (stats.unexpectedFail + stats.unexpectedPass != 0 || unexpectedFailure) {
217220
process.exitCode = 1;
218221
}
219222
}

0 commit comments

Comments
 (0)