diff options
Diffstat (limited to 'tools/wpt/runner.ts')
-rw-r--r-- | tools/wpt/runner.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/wpt/runner.ts b/tools/wpt/runner.ts index 2da3a95de..ee2fc2b74 100644 --- a/tools/wpt/runner.ts +++ b/tools/wpt/runner.ts @@ -11,7 +11,7 @@ export async function runWithTestUtil<T>( "wpt", "serve", "--config", - "../../tools/wpt/config.json", + "../../../tools/wpt/config.json", ], { stdout: verbose ? "inherit" : "piped", stderr: verbose ? "inherit" : "piped", @@ -31,7 +31,11 @@ export async function runWithTestUtil<T>( } const passedTime = performance.now() - start; if (passedTime > 15000) { - proc.kill("SIGINT"); + try { + proc.kill("SIGINT"); + } catch { + // Might have already died + } await proc.status; throw new Error("Timed out while trying to start wpt test util."); } @@ -43,7 +47,11 @@ export async function runWithTestUtil<T>( return await f(); } finally { if (verbose) console.log("Killing wpt test util."); - proc.kill("SIGINT"); + try { + proc.kill("SIGINT"); + } catch { + // Might have already died + } await proc.status; } } |