Skip to content

Commit 5b84643

Browse files
panvaUzlopak
authored andcommitted
test: always exit with 0 when running in Node's Daily WPT Report CI job (nodejs#2778)
1 parent 3ea2d64 commit 5b84643

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/wpt/runner/runner.mjs

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { fileURLToPath } from 'node:url'
55
import { Worker } from 'node:worker_threads'
66
import { colors, handlePipes, normalizeName, parseMeta, resolveStatusPath } from './util.mjs'
77

8+
const alwaysExit0 = process.env.GITHUB_WORKFLOW === 'Daily WPT report'
9+
810
const basePath = fileURLToPath(join(import.meta.url, '../..'))
911
const testPath = join(basePath, 'tests')
1012
const statusPath = join(basePath, 'status')
@@ -343,7 +345,11 @@ export class WPTRunner extends EventEmitter {
343345
`unexpected failures: ${failedTests - expectedFailures}`
344346
)
345347

346-
process.exit(failedTests - expectedFailures ? 1 : process.exitCode)
348+
if (alwaysExit0) {
349+
process.exit(0)
350+
} else {
351+
process.exit(failedTests - expectedFailures ? 1 : process.exitCode)
352+
}
347353
}
348354

349355
addInitScript (code) {

0 commit comments

Comments
 (0)