summaryrefslogtreecommitdiff
path: root/tools/wpt
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-06-14 13:48:57 +0200
committerGitHub <noreply@github.com>2021-06-14 13:48:57 +0200
commitd837445e44c9ed5c29901813d73818f84e97b294 (patch)
treeda40539191c48bee852b7b500f070558db00307e /tools/wpt
parenta6f1edd9533ae52f6d7c4841c395a34021dbdb71 (diff)
build: add wpt epoch/daily run (#10937)
This adds a daily scheduled CI pipeline that runs WPT tests against the most recent epochs/daily every night. Results are uploaded to wpt.fyi. WPTs are run on all supported platforms, on both stable and canary.
Diffstat (limited to 'tools/wpt')
-rw-r--r--tools/wpt/runner.ts4
-rw-r--r--tools/wpt/utils.ts16
2 files changed, 11 insertions, 9 deletions
diff --git a/tools/wpt/runner.ts b/tools/wpt/runner.ts
index 0cf625f01..3eb476fc9 100644
--- a/tools/wpt/runner.ts
+++ b/tools/wpt/runner.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
import { delay, join, readLines, ROOT_PATH, toFileUrl } from "../util.js";
-import { assert, ManifestTestOptions, release, runPy } from "./utils.ts";
+import { assert, denoBinary, ManifestTestOptions, runPy } from "./utils.ts";
import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.3-alpha2/deno-dom-wasm.ts";
export async function runWithTestUtil<T>(
@@ -88,7 +88,7 @@ export async function runSingleTest(
const proc = Deno.run({
cmd: [
- join(ROOT_PATH, `./target/${release ? "release" : "debug"}/deno`),
+ denoBinary(),
"run",
"-A",
"--unstable",
diff --git a/tools/wpt/utils.ts b/tools/wpt/utils.ts
index 3b1eb9965..0eb9a89e7 100644
--- a/tools/wpt/utils.ts
+++ b/tools/wpt/utils.ts
@@ -12,13 +12,19 @@ export const {
rebuild,
["--"]: rest,
["auto-config"]: autoConfig,
+ binary,
} = parse(Deno.args, {
"--": true,
boolean: ["quiet", "release", "no-interactive"],
- string: ["json", "wptreport"],
+ string: ["json", "wptreport", "binary"],
});
-/// PAGE ROOT
+export function denoBinary() {
+ if (binary) {
+ return binary;
+ }
+ return join(ROOT_PATH, `./target/${release ? "release" : "debug"}/deno`);
+}
/// WPT TEST MANIFEST
@@ -164,11 +170,7 @@ export async function generateRunInfo(): Promise<unknown> {
const revision = (new TextDecoder().decode(await proc.output())).trim();
proc.close();
const proc2 = Deno.run({
- cmd: [
- join(ROOT_PATH, `./target/${release ? "release" : "debug"}/deno`),
- "eval",
- "console.log(JSON.stringify(Deno.version))",
- ],
+ cmd: [denoBinary(), "eval", "console.log(JSON.stringify(Deno.version))"],
cwd: join(ROOT_PATH, "test_util", "wpt"),
stdout: "piped",
});