Skip to content

Commit eba88da

Browse files
DanielRyanSmithgsnedders
authored andcommitted
Make the same logging change for 2022 script
1 parent da0fc28 commit eba88da

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

interop-2022/main.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ const KNOWN_TEST_STATUSES = new Set([
122122
// than if we used rational numbers.
123123
function scoreRuns(runs, allTestsSet) {
124124
const scores = [];
125+
const unexpectedNonOKTests = new Set();
125126
try {
126127
for (const run of runs) {
127128
// Sum of the integer 0-1000 scores for each test.
@@ -139,7 +140,7 @@ function scoreRuns(runs, allTestsSet) {
139140
let subtestTotal = 1;
140141
if ('subtests' in results) {
141142
if (results['status'] != 'OK' && !KNOWN_TEST_STATUSES.has(testname)) {
142-
throw new Error(`Unexpected non-OK status for test: ${testname}`);
143+
unexpectedNonOKTests.add(testname);
143144
}
144145
subtestTotal = results['subtests'].length;
145146
for (const subtest of results['subtests']) {
@@ -181,6 +182,13 @@ function scoreRuns(runs, allTestsSet) {
181182
throw e;
182183
}
183184

185+
// Log and tests with unexpected non-OK statuses.
186+
if (unexpectedNonOKTests.size > 0) {
187+
console.log('Unexpected non-OK status for tests:');
188+
for (const testname of unexpectedNonOKTests.values()) {
189+
console.log(testname);
190+
}
191+
}
184192
return scores;
185193
}
186194

0 commit comments

Comments
 (0)