mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10: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,
|
||||
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);
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
|
|
|
@ -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"],
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue