1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

chore(wpt): add "--inspect-brk" flag to WPT runner (#13267)

This commit is contained in:
Sean Michael Wykes 2022-01-06 07:24:37 -03:00 committed by GitHub
parent 2d978a73eb
commit d92072c656
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 14 deletions

View file

@ -20,6 +20,7 @@ import {
getExpectation,
getExpectFailForCase,
getManifest,
inspectBrk,
json,
ManifestFolder,
ManifestTestOptions,
@ -161,6 +162,7 @@ async function run() {
test.url,
test.options,
createReportTestCase(test.expectation),
inspectBrk,
);
results.push({ test, result });
reportVariation(result, test.expectation);
@ -312,6 +314,7 @@ async function update() {
test.url,
test.options,
json ? () => {} : createReportTestCase(test.expectation),
inspectBrk,
);
results.push({ test, result });
reportVariation(result, test.expectation);

View file

@ -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,12 +89,21 @@ export async function runSingleTest(
const startTime = new Date().getTime();
const proc = Deno.run({
cmd: [
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(),
@ -101,7 +111,10 @@ export async function runSingleTest(
join(ROOT_PATH, `./tools/wpt/certs/cacert.pem`),
tempFile,
"[]",
],
);
const proc = Deno.run({
cmd,
env: {
NO_COLOR: "1",
},

View file

@ -12,10 +12,11 @@ export const {
rebuild,
["--"]: rest,
["auto-config"]: autoConfig,
["inspect-brk"]: inspectBrk,
binary,
} = parse(Deno.args, {
"--": true,
boolean: ["quiet", "release", "no-interactive"],
boolean: ["quiet", "release", "no-interactive", "inspect-brk"],
string: ["json", "wptreport", "binary"],
});