mirror of
https://github.com/denoland/deno.git
synced 2024-11-30 16:40:57 -05:00
chore(wpt): add "--inspect-brk" flag to WPT runner (#13267)
This commit is contained in:
parent
5b99b6150d
commit
3cf6f566cd
3 changed files with 31 additions and 14 deletions
|
@ -20,6 +20,7 @@ import {
|
||||||
getExpectation,
|
getExpectation,
|
||||||
getExpectFailForCase,
|
getExpectFailForCase,
|
||||||
getManifest,
|
getManifest,
|
||||||
|
inspectBrk,
|
||||||
json,
|
json,
|
||||||
ManifestFolder,
|
ManifestFolder,
|
||||||
ManifestTestOptions,
|
ManifestTestOptions,
|
||||||
|
@ -161,6 +162,7 @@ async function run() {
|
||||||
test.url,
|
test.url,
|
||||||
test.options,
|
test.options,
|
||||||
createReportTestCase(test.expectation),
|
createReportTestCase(test.expectation),
|
||||||
|
inspectBrk,
|
||||||
);
|
);
|
||||||
results.push({ test, result });
|
results.push({ test, result });
|
||||||
reportVariation(result, test.expectation);
|
reportVariation(result, test.expectation);
|
||||||
|
@ -312,6 +314,7 @@ async function update() {
|
||||||
test.url,
|
test.url,
|
||||||
test.options,
|
test.options,
|
||||||
json ? () => {} : createReportTestCase(test.expectation),
|
json ? () => {} : createReportTestCase(test.expectation),
|
||||||
|
inspectBrk,
|
||||||
);
|
);
|
||||||
results.push({ test, result });
|
results.push({ test, result });
|
||||||
reportVariation(result, test.expectation);
|
reportVariation(result, test.expectation);
|
||||||
|
|
|
@ -76,6 +76,7 @@ export async function runSingleTest(
|
||||||
url: URL,
|
url: URL,
|
||||||
_options: ManifestTestOptions,
|
_options: ManifestTestOptions,
|
||||||
reporter: (result: TestCaseResult) => void,
|
reporter: (result: TestCaseResult) => void,
|
||||||
|
inspectBrk: boolean,
|
||||||
): Promise<TestResult> {
|
): Promise<TestResult> {
|
||||||
const bundle = await generateBundle(url);
|
const bundle = await generateBundle(url);
|
||||||
const tempFile = await Deno.makeTempFile({
|
const tempFile = await Deno.makeTempFile({
|
||||||
|
@ -88,20 +89,32 @@ export async function runSingleTest(
|
||||||
|
|
||||||
const startTime = new Date().getTime();
|
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({
|
const proc = Deno.run({
|
||||||
cmd: [
|
cmd,
|
||||||
denoBinary(),
|
|
||||||
"run",
|
|
||||||
"-A",
|
|
||||||
"--unstable",
|
|
||||||
"--enable-testing-features-do-not-use",
|
|
||||||
"--location",
|
|
||||||
url.toString(),
|
|
||||||
"--cert",
|
|
||||||
join(ROOT_PATH, `./tools/wpt/certs/cacert.pem`),
|
|
||||||
tempFile,
|
|
||||||
"[]",
|
|
||||||
],
|
|
||||||
env: {
|
env: {
|
||||||
NO_COLOR: "1",
|
NO_COLOR: "1",
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,10 +12,11 @@ export const {
|
||||||
rebuild,
|
rebuild,
|
||||||
["--"]: rest,
|
["--"]: rest,
|
||||||
["auto-config"]: autoConfig,
|
["auto-config"]: autoConfig,
|
||||||
|
["inspect-brk"]: inspectBrk,
|
||||||
binary,
|
binary,
|
||||||
} = parse(Deno.args, {
|
} = parse(Deno.args, {
|
||||||
"--": true,
|
"--": true,
|
||||||
boolean: ["quiet", "release", "no-interactive"],
|
boolean: ["quiet", "release", "no-interactive", "inspect-brk"],
|
||||||
string: ["json", "wptreport", "binary"],
|
string: ["json", "wptreport", "binary"],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue