mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
chore: move tools/wpt
to tests/wpt/runner
(#22545)
Towards #22525 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Matt Mastracci <matthew@mastracci.com>
This commit is contained in:
parent
c559e813e1
commit
0022c35a23
17 changed files with 50 additions and 50 deletions
|
@ -51,8 +51,8 @@
|
||||||
"third_party",
|
"third_party",
|
||||||
"tools/node_compat/TODO.md",
|
"tools/node_compat/TODO.md",
|
||||||
"tools/node_compat/node",
|
"tools/node_compat/node",
|
||||||
"tools/wpt/expectation.json",
|
"tests/wpt/runner/expectation.json",
|
||||||
"tools/wpt/manifest.json",
|
"tests/wpt/runner/manifest.json",
|
||||||
"ext/websocket/autobahn/reports"
|
"ext/websocket/autobahn/reports"
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
|
8
.github/workflows/ci.generate.ts
vendored
8
.github/workflows/ci.generate.ts
vendored
|
@ -850,11 +850,11 @@ const ci = {
|
||||||
"deno run --allow-env --allow-net --allow-read --allow-run \\",
|
"deno run --allow-env --allow-net --allow-read --allow-run \\",
|
||||||
" --allow-write --unstable \\",
|
" --allow-write --unstable \\",
|
||||||
" --lock=tools/deno.lock.json \\",
|
" --lock=tools/deno.lock.json \\",
|
||||||
" ./tools/wpt.ts setup",
|
" ./tests/wpt/runner/runner.ts setup",
|
||||||
"deno run --allow-env --allow-net --allow-read --allow-run \\",
|
"deno run --allow-env --allow-net --allow-read --allow-run \\",
|
||||||
" --allow-write --unstable \\",
|
" --allow-write --unstable \\",
|
||||||
" --lock=tools/deno.lock.json \\",
|
" --lock=tools/deno.lock.json \\",
|
||||||
' ./tools/wpt.ts run --quiet --binary="$DENO_BIN"',
|
' ./tests/wpt/runner/runner.ts run --quiet --binary="$DENO_BIN"',
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -867,11 +867,11 @@ const ci = {
|
||||||
"deno run --allow-env --allow-net --allow-read --allow-run \\",
|
"deno run --allow-env --allow-net --allow-read --allow-run \\",
|
||||||
" --allow-write --unstable \\",
|
" --allow-write --unstable \\",
|
||||||
" --lock=tools/deno.lock.json \\",
|
" --lock=tools/deno.lock.json \\",
|
||||||
" ./tools/wpt.ts setup",
|
" ./tests/wpt/runner/runner.ts setup",
|
||||||
"deno run --allow-env --allow-net --allow-read --allow-run \\",
|
"deno run --allow-env --allow-net --allow-read --allow-run \\",
|
||||||
" --allow-write --unstable \\",
|
" --allow-write --unstable \\",
|
||||||
" --lock=tools/deno.lock.json \\",
|
" --lock=tools/deno.lock.json \\",
|
||||||
" ./tools/wpt.ts run --quiet --release \\",
|
" ./tests/wpt/runner/runner.ts run --quiet --release \\",
|
||||||
' --binary="$DENO_BIN" \\',
|
' --binary="$DENO_BIN" \\',
|
||||||
" --json=wpt.json \\",
|
" --json=wpt.json \\",
|
||||||
" --wptreport=wptreport.json",
|
" --wptreport=wptreport.json",
|
||||||
|
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -519,11 +519,11 @@ jobs:
|
||||||
deno run --allow-env --allow-net --allow-read --allow-run \
|
deno run --allow-env --allow-net --allow-read --allow-run \
|
||||||
--allow-write --unstable \
|
--allow-write --unstable \
|
||||||
--lock=tools/deno.lock.json \
|
--lock=tools/deno.lock.json \
|
||||||
./tools/wpt.ts setup
|
./tests/wpt/runner/runner.ts setup
|
||||||
deno run --allow-env --allow-net --allow-read --allow-run \
|
deno run --allow-env --allow-net --allow-read --allow-run \
|
||||||
--allow-write --unstable \
|
--allow-write --unstable \
|
||||||
--lock=tools/deno.lock.json \
|
--lock=tools/deno.lock.json \
|
||||||
./tools/wpt.ts run --quiet --binary="$DENO_BIN"
|
./tests/wpt/runner/runner.ts run --quiet --binary="$DENO_BIN"
|
||||||
- name: Run web platform tests (release)
|
- name: Run web platform tests (release)
|
||||||
if: '!(matrix.skip) && (matrix.wpt && matrix.profile == ''release'')'
|
if: '!(matrix.skip) && (matrix.wpt && matrix.profile == ''release'')'
|
||||||
env:
|
env:
|
||||||
|
@ -532,11 +532,11 @@ jobs:
|
||||||
deno run --allow-env --allow-net --allow-read --allow-run \
|
deno run --allow-env --allow-net --allow-read --allow-run \
|
||||||
--allow-write --unstable \
|
--allow-write --unstable \
|
||||||
--lock=tools/deno.lock.json \
|
--lock=tools/deno.lock.json \
|
||||||
./tools/wpt.ts setup
|
./tests/wpt/runner/runner.ts setup
|
||||||
deno run --allow-env --allow-net --allow-read --allow-run \
|
deno run --allow-env --allow-net --allow-read --allow-run \
|
||||||
--allow-write --unstable \
|
--allow-write --unstable \
|
||||||
--lock=tools/deno.lock.json \
|
--lock=tools/deno.lock.json \
|
||||||
./tools/wpt.ts run --quiet --release \
|
./tests/wpt/runner/runner.ts run --quiet --release \
|
||||||
--binary="$DENO_BIN" \
|
--binary="$DENO_BIN" \
|
||||||
--json=wpt.json \
|
--json=wpt.json \
|
||||||
--wptreport=wptreport.json
|
--wptreport=wptreport.json
|
||||||
|
|
4
.github/workflows/wpt_epoch.yml
vendored
4
.github/workflows/wpt_epoch.yml
vendored
|
@ -68,10 +68,10 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
deno run --unstable --allow-write --allow-read --allow-net \
|
deno run --unstable --allow-write --allow-read --allow-net \
|
||||||
--allow-env --allow-run --lock=tools/deno.lock.json \
|
--allow-env --allow-run --lock=tools/deno.lock.json \
|
||||||
./tools/wpt.ts setup
|
./tests/wpt/runner/runner.ts setup
|
||||||
deno run --unstable --allow-write --allow-read --allow-net \
|
deno run --unstable --allow-write --allow-read --allow-net \
|
||||||
--allow-env --allow-run --lock=tools/deno.lock.json \
|
--allow-env --allow-run --lock=tools/deno.lock.json \
|
||||||
./tools/wpt.ts run \
|
./tests/wpt/runner/runner.ts run \ \
|
||||||
--binary=$(which deno) --quiet --release --no-ignore --json=wpt.json --wptreport=wptreport.json
|
--binary=$(which deno) --quiet --release --no-ignore --json=wpt.json --wptreport=wptreport.json
|
||||||
|
|
||||||
- name: Upload wpt results to wpt.fyi
|
- name: Upload wpt results to wpt.fyi
|
||||||
|
|
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -10,7 +10,7 @@
|
||||||
gclient_config.py_entries
|
gclient_config.py_entries
|
||||||
/target/
|
/target/
|
||||||
/std/hash/_wasm/target
|
/std/hash/_wasm/target
|
||||||
/tools/wpt/manifest.json
|
/tests/wpt/runner/manifest.json
|
||||||
/third_party/
|
/third_party/
|
||||||
/tests/napi/node_modules
|
/tests/napi/node_modules
|
||||||
/tests/napi/build
|
/tests/napi/build
|
||||||
|
@ -25,8 +25,8 @@ gclient_config.py_entries
|
||||||
/flamegraph*.svg
|
/flamegraph*.svg
|
||||||
|
|
||||||
# WPT generated cert files
|
# WPT generated cert files
|
||||||
/tools/wpt/certs/index.txt*
|
/tests/wpt/runner/certs/index.txt*
|
||||||
/tools/wpt/certs/serial*
|
/tests/wpt/runner/certs/serial*
|
||||||
|
|
||||||
/ext/websocket/autobahn/reports
|
/ext/websocket/autobahn/reports
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ index 87a8cc9cc7..bbf500d8ca 100644
|
||||||
4. Run:
|
4. Run:
|
||||||
|
|
||||||
```
|
```
|
||||||
cp tests/wpt/suite/tools/certs/cacert.key tools/wpt/certs/cacert.key
|
cp tests/wpt/suite/tools/certs/cacert.key tests/wpt/runner/certs/cacert.key
|
||||||
cp tests/wpt/suite/tools/certs/cacert.pem tools/wpt/certs/cacert.pem
|
cp tests/wpt/suite/tools/certs/cacert.pem tests/wpt/runner/certs/cacert.pem
|
||||||
cp tests/wpt/suite/tools/certs/web-platform.test.key tools/wpt/certs/web-platform.test.key
|
cp tests/wpt/suite/tools/certs/web-platform.test.key tests/wpt/runner/certs/web-platform.test.key
|
||||||
cp tests/wpt/suite/tools/certs/web-platform.test.pem tools/wpt/certs/web-platform.test.pem
|
cp tests/wpt/suite/tools/certs/web-platform.test.pem tests/wpt/runner/certs/web-platform.test.pem
|
||||||
```
|
```
|
11
tests/wpt/runner/config.json
Normal file
11
tests/wpt/runner/config.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"check_subdomains": false,
|
||||||
|
"ssl": {
|
||||||
|
"type": "pregenerated",
|
||||||
|
"pregenerated": {
|
||||||
|
"ca_cert_path": "../../../tests/wpt/runner/certs/cacert.pem",
|
||||||
|
"host_cert_path": "../../../tests/wpt/runner/certs/web-platform.test.pem",
|
||||||
|
"host_key_path": "../../../tests/wpt/runner/certs/web-platform.test.key"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,11 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { delay, join, ROOT_PATH, TextLineStream, toFileUrl } from "../util.js";
|
import {
|
||||||
|
delay,
|
||||||
|
join,
|
||||||
|
ROOT_PATH,
|
||||||
|
TextLineStream,
|
||||||
|
toFileUrl,
|
||||||
|
} from "../../../tools/util.js";
|
||||||
import { assert, denoBinary, ManifestTestOptions, runPy } from "./utils.ts";
|
import { assert, denoBinary, ManifestTestOptions, runPy } from "./utils.ts";
|
||||||
import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.3-alpha2/deno-dom-wasm.ts";
|
import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.3-alpha2/deno-dom-wasm.ts";
|
||||||
|
|
||||||
|
@ -11,7 +17,7 @@ export async function runWithTestUtil<T>(
|
||||||
"wpt",
|
"wpt",
|
||||||
"serve",
|
"serve",
|
||||||
"--config",
|
"--config",
|
||||||
"../../../tools/wpt/config.json",
|
"../../../tests/wpt/runner/config.json",
|
||||||
], {
|
], {
|
||||||
stdout: verbose ? "inherit" : "piped",
|
stdout: verbose ? "inherit" : "piped",
|
||||||
stderr: verbose ? "inherit" : "piped",
|
stderr: verbose ? "inherit" : "piped",
|
||||||
|
@ -123,7 +129,7 @@ export async function runSingleTest(
|
||||||
"--location",
|
"--location",
|
||||||
url.toString(),
|
url.toString(),
|
||||||
"--cert",
|
"--cert",
|
||||||
join(ROOT_PATH, `./tools/wpt/certs/cacert.pem`),
|
join(ROOT_PATH, `./tests/wpt/runner/certs/cacert.pem`),
|
||||||
tempFile,
|
tempFile,
|
||||||
"[]",
|
"[]",
|
||||||
);
|
);
|
||||||
|
@ -205,7 +211,7 @@ async function generateBundle(location: URL): Promise<string> {
|
||||||
const src = script.getAttribute("src");
|
const src = script.getAttribute("src");
|
||||||
if (src === "/resources/testharnessreport.js") {
|
if (src === "/resources/testharnessreport.js") {
|
||||||
const url = toFileUrl(
|
const url = toFileUrl(
|
||||||
join(ROOT_PATH, "./tools/wpt/testharnessreport.js"),
|
join(ROOT_PATH, "./tests/wpt/runner/testharnessreport.js"),
|
||||||
);
|
);
|
||||||
const contents = await Deno.readTextFile(url);
|
const contents = await Deno.readTextFile(url);
|
||||||
scriptContents.push([url.href, contents]);
|
scriptContents.push([url.href, contents]);
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
/// FLAGS
|
/// FLAGS
|
||||||
|
|
||||||
import { parse } from "../../tests/util/std/flags/mod.ts";
|
import { parse } from "../../util/std/flags/mod.ts";
|
||||||
import { join, resolve, ROOT_PATH } from "../util.js";
|
import { join, resolve, ROOT_PATH } from "../../../tools/util.js";
|
||||||
|
|
||||||
export const {
|
export const {
|
||||||
json,
|
json,
|
||||||
|
@ -51,7 +51,7 @@ export interface ManifestTestOptions {
|
||||||
script_metadata: [string, string][];
|
script_metadata: [string, string][];
|
||||||
}
|
}
|
||||||
|
|
||||||
const MANIFEST_PATH = join(ROOT_PATH, "./tools/wpt/manifest.json");
|
const MANIFEST_PATH = join(ROOT_PATH, "./tests/wpt/runner/manifest.json");
|
||||||
|
|
||||||
export async function updateManifest() {
|
export async function updateManifest() {
|
||||||
const status = await runPy(
|
const status = await runPy(
|
||||||
|
@ -76,7 +76,7 @@ export function getManifest(): Manifest {
|
||||||
|
|
||||||
/// WPT TEST EXPECTATIONS
|
/// WPT TEST EXPECTATIONS
|
||||||
|
|
||||||
const EXPECTATION_PATH = join(ROOT_PATH, "./tools/wpt/expectation.json");
|
const EXPECTATION_PATH = join(ROOT_PATH, "./tests/wpt/runner/expectation.json");
|
||||||
|
|
||||||
export interface Expectation {
|
export interface Expectation {
|
||||||
[key: string]: Expectation | boolean | string[];
|
[key: string]: Expectation | boolean | string[];
|
|
@ -8,7 +8,7 @@ import {
|
||||||
runWithTestUtil,
|
runWithTestUtil,
|
||||||
TestCaseResult,
|
TestCaseResult,
|
||||||
TestResult,
|
TestResult,
|
||||||
} from "./wpt/runner.ts";
|
} from "./runner/runner.ts";
|
||||||
import {
|
import {
|
||||||
assert,
|
assert,
|
||||||
autoConfig,
|
autoConfig,
|
||||||
|
@ -31,17 +31,11 @@ import {
|
||||||
runPy,
|
runPy,
|
||||||
updateManifest,
|
updateManifest,
|
||||||
wptreport,
|
wptreport,
|
||||||
} from "./wpt/utils.ts";
|
} from "./runner/utils.ts";
|
||||||
import { pooledMap } from "../tests/util/std/async/pool.ts";
|
import { pooledMap } from "../util/std/async/pool.ts";
|
||||||
import {
|
import { blue, bold, green, red, yellow } from "../util/std/fmt/colors.ts";
|
||||||
blue,
|
import { writeAll, writeAllSync } from "../util/std/streams/write_all.ts";
|
||||||
bold,
|
import { saveExpectation } from "./runner/utils.ts";
|
||||||
green,
|
|
||||||
red,
|
|
||||||
yellow,
|
|
||||||
} from "../tests/util/std/fmt/colors.ts";
|
|
||||||
import { writeAll, writeAllSync } from "../tests/util/std/streams/write_all.ts";
|
|
||||||
import { saveExpectation } from "./wpt/utils.ts";
|
|
||||||
|
|
||||||
class TestFilter {
|
class TestFilter {
|
||||||
filter?: string[];
|
filter?: string[];
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"check_subdomains": false,
|
|
||||||
"ssl": {
|
|
||||||
"type": "pregenerated",
|
|
||||||
"pregenerated": {
|
|
||||||
"ca_cert_path": "../../../tools/wpt/certs/cacert.pem",
|
|
||||||
"host_cert_path": "../../../tools/wpt/certs/web-platform.test.pem",
|
|
||||||
"host_key_path": "../../../tools/wpt/certs/web-platform.test.key"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue