Skip to content

Commit 6e81d41

Browse files
authored
fix handling of missing WPT results (#890)
1 parent 3f2db5c commit 6e81d41

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/wpt-harness/run-wpt.mjs

+3-2
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ async function run() {
220220

221221
if (config.tests.updateExpectations) {
222222
console.log(`Expectations updated: ${expectationsUpdated}`);
223-
} else if (stats.unexpectedFail + stats.unexpectedPass != 0 || unexpectedFailure) {
223+
} else if (stats.unexpectedFail + stats.unexpectedPass + stats.missing != 0 || unexpectedFailure) {
224224
process.exitCode = 1;
225225
}
226226
}
@@ -458,7 +458,8 @@ async function runTests(testPaths, viceroy, resultCallback, errorCallback) {
458458
await resultCallback(path, results, stats);
459459
} catch (e) {
460460
if (!results) {
461-
e = new Error(`Parsing test results as JSON failed. Output was:\n ${body}`);
461+
e = new Error(`\nMISSING TEST RESULTS: ${path}\nParsing test results as JSON failed. Output was:\n ${body}`);
462+
totalStats.missing += Math.max(Object.keys(expectations).length, 1);
462463
}
463464
if (config.logLevel >= LogLevel.Verbose) {
464465
console.log(`Error running file ${path}: ${e.message}, stack:\n${e.stack}`);

0 commit comments

Comments
 (0)