diff options
-rw-r--r-- | .dprint.json | 4 | ||||
-rwxr-xr-x | .github/workflows/ci.generate.ts | 8 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 8 | ||||
-rw-r--r-- | .github/workflows/wpt_epoch.yml | 4 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | tests/wpt/runner/certs/README.md (renamed from tools/wpt/certs/README.md) | 8 | ||||
-rw-r--r-- | tests/wpt/runner/certs/cacert.key (renamed from tools/wpt/certs/cacert.key) | 0 | ||||
-rw-r--r-- | tests/wpt/runner/certs/cacert.pem (renamed from tools/wpt/certs/cacert.pem) | 0 | ||||
-rw-r--r-- | tests/wpt/runner/certs/web-platform.test.key (renamed from tools/wpt/certs/web-platform.test.key) | 0 | ||||
-rw-r--r-- | tests/wpt/runner/certs/web-platform.test.pem (renamed from tools/wpt/certs/web-platform.test.pem) | 0 | ||||
-rw-r--r-- | tests/wpt/runner/config.json | 11 | ||||
-rw-r--r-- | tests/wpt/runner/expectation.json (renamed from tools/wpt/expectation.json) | 0 | ||||
-rw-r--r-- | tests/wpt/runner/runner.ts (renamed from tools/wpt/runner.ts) | 14 | ||||
-rw-r--r-- | tests/wpt/runner/testharnessreport.js (renamed from tools/wpt/testharnessreport.js) | 0 | ||||
-rw-r--r-- | tests/wpt/runner/utils.ts (renamed from tools/wpt/utils.ts) | 8 | ||||
-rwxr-xr-x | tests/wpt/wpt.ts (renamed from tools/wpt.ts) | 18 | ||||
-rw-r--r-- | tools/wpt/config.json | 11 |
17 files changed, 50 insertions, 50 deletions
diff --git a/.dprint.json b/.dprint.json index 7e64267ca..76c84b68b 100644 --- a/.dprint.json +++ b/.dprint.json @@ -51,8 +51,8 @@ "third_party", "tools/node_compat/TODO.md", "tools/node_compat/node", - "tools/wpt/expectation.json", - "tools/wpt/manifest.json", + "tests/wpt/runner/expectation.json", + "tests/wpt/runner/manifest.json", "ext/websocket/autobahn/reports" ], "plugins": [ diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index b2a8c99c9..8ad59150b 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -850,11 +850,11 @@ const ci = { "deno run --allow-env --allow-net --allow-read --allow-run \\", " --allow-write --unstable \\", " --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 \\", " --allow-write --unstable \\", " --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"), }, { @@ -867,11 +867,11 @@ const ci = { "deno run --allow-env --allow-net --allow-read --allow-run \\", " --allow-write --unstable \\", " --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 \\", " --allow-write --unstable \\", " --lock=tools/deno.lock.json \\", - " ./tools/wpt.ts run --quiet --release \\", + " ./tests/wpt/runner/runner.ts run --quiet --release \\", ' --binary="$DENO_BIN" \\', " --json=wpt.json \\", " --wptreport=wptreport.json", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b36195beb..7a5f2ce64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -519,11 +519,11 @@ jobs: deno run --allow-env --allow-net --allow-read --allow-run \ --allow-write --unstable \ --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 \ --allow-write --unstable \ --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) if: '!(matrix.skip) && (matrix.wpt && matrix.profile == ''release'')' env: @@ -532,11 +532,11 @@ jobs: deno run --allow-env --allow-net --allow-read --allow-run \ --allow-write --unstable \ --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 \ --allow-write --unstable \ --lock=tools/deno.lock.json \ - ./tools/wpt.ts run --quiet --release \ + ./tests/wpt/runner/runner.ts run --quiet --release \ --binary="$DENO_BIN" \ --json=wpt.json \ --wptreport=wptreport.json diff --git a/.github/workflows/wpt_epoch.yml b/.github/workflows/wpt_epoch.yml index 2bc4472b1..359c8ef27 100644 --- a/.github/workflows/wpt_epoch.yml +++ b/.github/workflows/wpt_epoch.yml @@ -68,10 +68,10 @@ jobs: run: | deno run --unstable --allow-write --allow-read --allow-net \ --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 \ --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 - name: Upload wpt results to wpt.fyi diff --git a/.gitignore b/.gitignore index 37f568324..8be7f979d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ gclient_config.py_entries /target/ /std/hash/_wasm/target -/tools/wpt/manifest.json +/tests/wpt/runner/manifest.json /third_party/ /tests/napi/node_modules /tests/napi/build @@ -25,8 +25,8 @@ gclient_config.py_entries /flamegraph*.svg # WPT generated cert files -/tools/wpt/certs/index.txt* -/tools/wpt/certs/serial* +/tests/wpt/runner/certs/index.txt* +/tests/wpt/runner/certs/serial* /ext/websocket/autobahn/reports diff --git a/tools/wpt/certs/README.md b/tests/wpt/runner/certs/README.md index c2d74ee3d..f3ebfc652 100644 --- a/tools/wpt/certs/README.md +++ b/tests/wpt/runner/certs/README.md @@ -23,8 +23,8 @@ index 87a8cc9cc7..bbf500d8ca 100644 4. Run: ``` -cp tests/wpt/suite/tools/certs/cacert.key tools/wpt/certs/cacert.key -cp tests/wpt/suite/tools/certs/cacert.pem tools/wpt/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.pem tools/wpt/certs/web-platform.test.pem +cp tests/wpt/suite/tools/certs/cacert.key tests/wpt/runner/certs/cacert.key +cp tests/wpt/suite/tools/certs/cacert.pem tests/wpt/runner/certs/cacert.pem +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 tests/wpt/runner/certs/web-platform.test.pem ``` diff --git a/tools/wpt/certs/cacert.key b/tests/wpt/runner/certs/cacert.key index 372ccca44..372ccca44 100644 --- a/tools/wpt/certs/cacert.key +++ b/tests/wpt/runner/certs/cacert.key diff --git a/tools/wpt/certs/cacert.pem b/tests/wpt/runner/certs/cacert.pem index 9bc42cc1b..9bc42cc1b 100644 --- a/tools/wpt/certs/cacert.pem +++ b/tests/wpt/runner/certs/cacert.pem diff --git a/tools/wpt/certs/web-platform.test.key b/tests/wpt/runner/certs/web-platform.test.key index 661a9ba87..661a9ba87 100644 --- a/tools/wpt/certs/web-platform.test.key +++ b/tests/wpt/runner/certs/web-platform.test.key diff --git a/tools/wpt/certs/web-platform.test.pem b/tests/wpt/runner/certs/web-platform.test.pem index 0e48d23e2..0e48d23e2 100644 --- a/tools/wpt/certs/web-platform.test.pem +++ b/tests/wpt/runner/certs/web-platform.test.pem diff --git a/tests/wpt/runner/config.json b/tests/wpt/runner/config.json new file mode 100644 index 000000000..92472371f --- /dev/null +++ b/tests/wpt/runner/config.json @@ -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" + } + } +} diff --git a/tools/wpt/expectation.json b/tests/wpt/runner/expectation.json index 29eeea08c..29eeea08c 100644 --- a/tools/wpt/expectation.json +++ b/tests/wpt/runner/expectation.json diff --git a/tools/wpt/runner.ts b/tests/wpt/runner/runner.ts index ee2fc2b74..c7234da63 100644 --- a/tools/wpt/runner.ts +++ b/tests/wpt/runner/runner.ts @@ -1,5 +1,11 @@ // 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 { 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", "serve", "--config", - "../../../tools/wpt/config.json", + "../../../tests/wpt/runner/config.json", ], { stdout: verbose ? "inherit" : "piped", stderr: verbose ? "inherit" : "piped", @@ -123,7 +129,7 @@ export async function runSingleTest( "--location", url.toString(), "--cert", - join(ROOT_PATH, `./tools/wpt/certs/cacert.pem`), + join(ROOT_PATH, `./tests/wpt/runner/certs/cacert.pem`), tempFile, "[]", ); @@ -205,7 +211,7 @@ async function generateBundle(location: URL): Promise<string> { const src = script.getAttribute("src"); if (src === "/resources/testharnessreport.js") { const url = toFileUrl( - join(ROOT_PATH, "./tools/wpt/testharnessreport.js"), + join(ROOT_PATH, "./tests/wpt/runner/testharnessreport.js"), ); const contents = await Deno.readTextFile(url); scriptContents.push([url.href, contents]); diff --git a/tools/wpt/testharnessreport.js b/tests/wpt/runner/testharnessreport.js index 7cc6a9e2d..7cc6a9e2d 100644 --- a/tools/wpt/testharnessreport.js +++ b/tests/wpt/runner/testharnessreport.js diff --git a/tools/wpt/utils.ts b/tests/wpt/runner/utils.ts index bc25505bd..5e3399fa7 100644 --- a/tools/wpt/utils.ts +++ b/tests/wpt/runner/utils.ts @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. /// FLAGS -import { parse } from "../../tests/util/std/flags/mod.ts"; -import { join, resolve, ROOT_PATH } from "../util.js"; +import { parse } from "../../util/std/flags/mod.ts"; +import { join, resolve, ROOT_PATH } from "../../../tools/util.js"; export const { json, @@ -51,7 +51,7 @@ export interface ManifestTestOptions { 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() { const status = await runPy( @@ -76,7 +76,7 @@ export function getManifest(): Manifest { /// 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 { [key: string]: Expectation | boolean | string[]; diff --git a/tools/wpt.ts b/tests/wpt/wpt.ts index 93b96b201..351ee518c 100755 --- a/tools/wpt.ts +++ b/tests/wpt/wpt.ts @@ -8,7 +8,7 @@ import { runWithTestUtil, TestCaseResult, TestResult, -} from "./wpt/runner.ts"; +} from "./runner/runner.ts"; import { assert, autoConfig, @@ -31,17 +31,11 @@ import { runPy, updateManifest, wptreport, -} from "./wpt/utils.ts"; -import { pooledMap } from "../tests/util/std/async/pool.ts"; -import { - blue, - bold, - 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"; +} from "./runner/utils.ts"; +import { pooledMap } from "../util/std/async/pool.ts"; +import { blue, bold, green, red, yellow } from "../util/std/fmt/colors.ts"; +import { writeAll, writeAllSync } from "../util/std/streams/write_all.ts"; +import { saveExpectation } from "./runner/utils.ts"; class TestFilter { filter?: string[]; diff --git a/tools/wpt/config.json b/tools/wpt/config.json deleted file mode 100644 index 4b2a914f9..000000000 --- a/tools/wpt/config.json +++ /dev/null @@ -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" - } - } -} |