summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-04-17 20:40:47 +1000
committerGitHub <noreply@github.com>2024-04-17 10:40:47 +0000
commit9acbf90b06bf79dd6e4cf2428b3566da009bed65 (patch)
treefbc7e2deb36fffefab39998606e42b2a3cbf543c
parentebc22d9d7ed53031428dfecde1b0a57121c91685 (diff)
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
-rw-r--r--.github/workflows/wpt_epoch.yml2
-rwxr-xr-xtests/wpt/wpt.ts6
2 files changed, 7 insertions, 1 deletions
diff --git a/.github/workflows/wpt_epoch.yml b/.github/workflows/wpt_epoch.yml
index 75a2886aa..3155ae42f 100644
--- a/.github/workflows/wpt_epoch.yml
+++ b/.github/workflows/wpt_epoch.yml
@@ -72,7 +72,7 @@ jobs:
deno run --unstable --allow-write --allow-read --allow-net \
--allow-env --allow-run --lock=tools/deno.lock.json \
./tests/wpt/wpt.ts run \ \
- --binary=$(which deno) --quiet --release --no-ignore --json=wpt.json --wptreport=wptreport.json
+ --binary=$(which deno) --quiet --release --no-ignore --json=wpt.json --wptreport=wptreport.json --exit-zero
- name: Upload wpt results to wpt.fyi
env:
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;
}