diff options
| author | Sean Michael Wykes <8363933+SeanWykes@users.noreply.github.com> | 2022-01-06 07:24:37 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-06 11:24:37 +0100 |
| commit | d92072c656ac0e764c1588ad5825ce6a10703352 (patch) | |
| tree | e2cf9c26764e73c4d4dbc2a3e7ac7e51f4dae46e /tools/wpt/runner.ts | |
| parent | 2d978a73ebc68d67672fca4df9afb8ab01fcc4f8 (diff) | |
chore(wpt): add "--inspect-brk" flag to WPT runner (#13267)
Diffstat (limited to 'tools/wpt/runner.ts')
| -rw-r--r-- | tools/wpt/runner.ts | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/tools/wpt/runner.ts b/tools/wpt/runner.ts index 4f4389fd3..b7a51af9d 100644 --- a/tools/wpt/runner.ts +++ b/tools/wpt/runner.ts @@ -76,6 +76,7 @@ export async function runSingleTest( url: URL, _options: ManifestTestOptions, reporter: (result: TestCaseResult) => void, + inspectBrk: boolean, ): Promise<TestResult> { const bundle = await generateBundle(url); const tempFile = await Deno.makeTempFile({ @@ -88,20 +89,32 @@ export async function runSingleTest( const startTime = new Date().getTime(); + const cmd = [ + denoBinary(), + "run", + ]; + + cmd.push( + "-A", + "--unstable", + ); + + if (inspectBrk) { + cmd.push("--inspect-brk"); + } + + cmd.push( + "--enable-testing-features-do-not-use", + "--location", + url.toString(), + "--cert", + join(ROOT_PATH, `./tools/wpt/certs/cacert.pem`), + tempFile, + "[]", + ); + const proc = Deno.run({ - cmd: [ - denoBinary(), - "run", - "-A", - "--unstable", - "--enable-testing-features-do-not-use", - "--location", - url.toString(), - "--cert", - join(ROOT_PATH, `./tools/wpt/certs/cacert.pem`), - tempFile, - "[]", - ], + cmd, env: { NO_COLOR: "1", }, |
