From 9acbf90b06bf79dd6e4cf2428b3566da009bed65 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 17 Apr 2024 20:40:47 +1000 Subject: fix: allow WPT to successfully exit using `--exit-zero` (#23418) I went with `--exit-zero`. Happy to change to `--no-exit` if feelings are strong. Supercedes #23417 --- tests/wpt/wpt.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/wpt/wpt.ts b/tests/wpt/wpt.ts index 056db5dc0..675ef3ae0 100755 --- a/tests/wpt/wpt.ts +++ b/tests/wpt/wpt.ts @@ -550,6 +550,12 @@ function reportFinal( }. ${finalPassedCount} passed; ${finalFailedCount} failed; ${finalExpectedFailedAndFailedCount} expected failure; total ${finalTotalCount} (${duration}ms)\n`, ); + // We ignore the exit code of the test run because the CI job reports the + // results to WPT.fyi, and we still want to report failure. + if (Deno.args.includes("--exit-zero")) { + return 0; + } + return failed ? 1 : 0; } -- cgit v1.2.3