1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

tests: fix bug in WPT test harness (#10920)

This commit is contained in:
Bert Belder 2021-06-23 15:46:15 +00:00
parent abd7a8a9cd
commit 5a250b9e55
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461
3 changed files with 6 additions and 5 deletions

View file

@ -3,9 +3,10 @@ import {
dirname, dirname,
fromFileUrl, fromFileUrl,
join, join,
resolve,
toFileUrl, toFileUrl,
} from "https://deno.land/std@0.84.0/path/mod.ts"; } from "https://deno.land/std@0.84.0/path/mod.ts";
export { dirname, fromFileUrl, join, toFileUrl }; export { dirname, fromFileUrl, join, resolve, toFileUrl };
export { existsSync } from "https://deno.land/std@0.84.0/fs/mod.ts"; export { existsSync } from "https://deno.land/std@0.84.0/fs/mod.ts";
export { readLines } from "https://deno.land/std@0.97.0/io/mod.ts"; export { readLines } from "https://deno.land/std@0.97.0/io/mod.ts";
export { delay } from "https://deno.land/std@0.84.0/async/delay.ts"; export { delay } from "https://deno.land/std@0.84.0/async/delay.ts";

View file

@ -197,7 +197,7 @@ async function run() {
} }
if (wptreport) { if (wptreport) {
const report = await generateWptreport(results, startTime, endTime); const report = await generateWptReport(results, startTime, endTime);
await Deno.writeTextFile(wptreport, JSON.stringify(report)); await Deno.writeTextFile(wptreport, JSON.stringify(report));
} }
@ -205,7 +205,7 @@ async function run() {
Deno.exit(code); Deno.exit(code);
} }
async function generateWptreport( async function generateWptReport(
results: { test: TestToRun; result: TestResult }[], results: { test: TestToRun; result: TestResult }[],
startTime: number, startTime: number,
endTime: number, endTime: number,

View file

@ -2,7 +2,7 @@
/// FLAGS /// FLAGS
import { parse } from "https://deno.land/std@0.84.0/flags/mod.ts"; import { parse } from "https://deno.land/std@0.84.0/flags/mod.ts";
import { join, ROOT_PATH } from "../util.js"; import { join, resolve, ROOT_PATH } from "../util.js";
export const { export const {
json, json,
@ -21,7 +21,7 @@ export const {
export function denoBinary() { export function denoBinary() {
if (binary) { if (binary) {
return binary; return resolve(binary);
} }
return join(ROOT_PATH, `./target/${release ? "release" : "debug"}/deno`); return join(ROOT_PATH, `./target/${release ? "release" : "debug"}/deno`);
} }