Skip to content

Commit

Permalink
test: always exit with 0 when running in Node's Daily WPT Report CI j…
Browse files Browse the repository at this point in the history
…ob (nodejs#2778)
  • Loading branch information
panva authored and Uzlopak committed Feb 19, 2024
1 parent 3ea2d64 commit 5b84643
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/wpt/runner/runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { fileURLToPath } from 'node:url'
import { Worker } from 'node:worker_threads'
import { colors, handlePipes, normalizeName, parseMeta, resolveStatusPath } from './util.mjs'

const alwaysExit0 = process.env.GITHUB_WORKFLOW === 'Daily WPT report'

const basePath = fileURLToPath(join(import.meta.url, '../..'))
const testPath = join(basePath, 'tests')
const statusPath = join(basePath, 'status')
Expand Down Expand Up @@ -343,7 +345,11 @@ export class WPTRunner extends EventEmitter {
`unexpected failures: ${failedTests - expectedFailures}`
)

process.exit(failedTests - expectedFailures ? 1 : process.exitCode)
if (alwaysExit0) {
process.exit(0)
} else {
process.exit(failedTests - expectedFailures ? 1 : process.exitCode)
}
}

addInitScript (code) {
Expand Down

0 comments on commit 5b84643

Please sign in to comment.