summaryrefslogtreecommitdiff
path: root/tools/wpt
diff options
context:
space:
mode:
Diffstat (limited to 'tools/wpt')
-rw-r--r--tools/wpt/runner.ts4
-rw-r--r--tools/wpt/utils.ts20
2 files changed, 12 insertions, 12 deletions
diff --git a/tools/wpt/runner.ts b/tools/wpt/runner.ts
index 269e6ffd1..517ce42b5 100644
--- a/tools/wpt/runner.ts
+++ b/tools/wpt/runner.ts
@@ -107,14 +107,14 @@ export async function runSingleTest(
"[]",
);
- const proc = Deno.spawnChild(denoBinary(), {
+ const proc = new Deno.Command(denoBinary(), {
args,
env: {
NO_COLOR: "1",
},
stdout: "null",
stderr: "piped",
- });
+ }).spawn();
const cases = [];
let stderr = "";
diff --git a/tools/wpt/utils.ts b/tools/wpt/utils.ts
index c77effa62..7614a0c55 100644
--- a/tools/wpt/utils.ts
+++ b/tools/wpt/utils.ts
@@ -118,18 +118,18 @@ export function assert(condition: unknown, message: string): asserts condition {
}
}
-export function runPy<T extends Omit<Deno.SpawnOptions, "cwd">>(
+export function runPy<T extends Omit<Deno.CommandOptions, "cwd">>(
args: string[],
options: T,
-): Deno.Child<T> {
+): Deno.ChildProcess {
const cmd = Deno.build.os == "windows" ? "python.exe" : "python3";
- return Deno.spawnChild(cmd, {
+ return new Deno.Command(cmd, {
args,
stdout: "inherit",
stderr: "inherit",
...options,
cwd: join(ROOT_PATH, "./test_util/wpt/"),
- });
+ }).spawn();
}
export async function checkPy3Available() {
@@ -148,12 +148,12 @@ export async function checkPy3Available() {
export async function cargoBuild() {
if (binary) return;
- const { success } = await Deno.spawn("cargo", {
+ const { success } = await new Deno.Command("cargo", {
args: ["build", ...(release ? ["--release"] : [])],
cwd: ROOT_PATH,
stdout: "inherit",
stderr: "inherit",
- });
+ }).output();
assert(success, "cargo build failed");
}
@@ -175,16 +175,16 @@ export async function generateRunInfo(): Promise<unknown> {
"darwin": "mac",
"linux": "linux",
};
- const proc = await Deno.spawn("git", {
+ const proc = await new Deno.Command("git", {
args: ["rev-parse", "HEAD"],
cwd: join(ROOT_PATH, "test_util", "wpt"),
stderr: "inherit",
- });
+ }).output();
const revision = (new TextDecoder().decode(proc.stdout)).trim();
- const proc2 = await Deno.spawn(denoBinary(), {
+ const proc2 = await new Deno.Command(denoBinary(), {
args: ["eval", "console.log(JSON.stringify(Deno.version))"],
cwd: join(ROOT_PATH, "test_util", "wpt"),
- });
+ }).output();
const version = JSON.parse(new TextDecoder().decode(proc2.stdout));
const runInfo = {
"os": oses[Deno.build.os],