From 469a76a612d8f8d7855e2ac6881fdf59e38822d6 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Sun, 18 Feb 2024 18:17:02 +0100 Subject: [PATCH] test: always exit with 0 when running in Node's Daily WPT Report CI job (#2778) --- test/wpt/runner/runner.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/wpt/runner/runner.mjs b/test/wpt/runner/runner.mjs index cbd5ea540d8..a24576f7415 100644 --- a/test/wpt/runner/runner.mjs +++ b/test/wpt/runner/runner.mjs @@ -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') @@ -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) {