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 crysmags committed Feb 21, 2024
1 parent eea95b9 commit a034ab3
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 a034ab3

Please sign in to comment.