diff options
Diffstat (limited to 'tools/wpt')
| -rw-r--r-- | tools/wpt/runner.ts | 4 | ||||
| -rw-r--r-- | tools/wpt/utils.ts | 16 |
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", }); |
