summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/wpt_epoch.yml14
-rw-r--r--.gitignore4
-rw-r--r--.gitmodules7
m---------test_util/wpt0
-rwxr-xr-xtools/wpt.ts16
-rw-r--r--tools/wpt/certs/index.txt0
-rw-r--r--tools/wpt/certs/serial1
-rw-r--r--tools/wpt/config.json7
-rw-r--r--tools/wpt/utils.ts1
9 files changed, 28 insertions, 22 deletions
diff --git a/.github/workflows/wpt_epoch.yml b/.github/workflows/wpt_epoch.yml
index 992d69d00..84743c568 100644
--- a/.github/workflows/wpt_epoch.yml
+++ b/.github/workflows/wpt_epoch.yml
@@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
deno-version: [v1.x, canary]
- os: [macOS-latest, ubuntu-latest-xl, windows-2019]
+ os: [ubuntu-latest-xl]
steps:
- name: Clone repository
@@ -46,7 +46,12 @@ jobs:
- name: Switch WPT submodule to epochs/daily
working-directory: test_util/wpt/
- run: git reset origin/epochs/daily --hard
+ shell: bash
+ run: |
+ git remote set-branches origin '*'
+ git fetch origin
+ git checkout origin/epochs/daily
+ git checkout -b epochs/daily
- name: Configure hosts file for WPT (unix)
if: runner.os != 'Windows'
@@ -62,8 +67,11 @@ jobs:
shell: bash
run: |
deno run --unstable --allow-write --allow-read --allow-net --allow-env --allow-run ./tools/wpt.ts setup
- deno run --unstable --allow-write --allow-read --allow-net --allow-env --allow-run ./tools/wpt.ts run --binary=(which deno) --quiet --release --json=wpt.json --wptreport=wptreport.json || true
+ deno run --unstable --allow-write --allow-read --allow-net --allow-env --allow-run ./tools/wpt.ts run --binary=$(which deno) --quiet --release --json=wpt.json --wptreport=wptreport.json || true
- name: Upload wpt results to wpt.fyi
+ env:
+ WPT_FYI_STAGING_USER: ${{ secrets.WPT_FYI_STAGING_USER }}
+ WPT_FYI_STAGING_PW: ${{ secrets.WPT_FYI_STAGING_PW }}
run: |
deno run -A ./tools/upload_wptfyi.js wptreport.json --from-raw-file
diff --git a/.gitignore b/.gitignore
index 0ab773c15..31a004939 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,7 @@ cli/tests/.test_coverage/
# Flamegraphs
/flamebench*.svg
/flamegraph*.svg
+
+# WPT generated cert files
+/tools/wpt/certs/index.txt*
+/tools/wpt/certs/serial*
diff --git a/.gitmodules b/.gitmodules
index 8e78a444b..1967e6cfa 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,11 +2,10 @@
path = third_party
url = https://github.com/denoland/deno_third_party.git
shallow = true
-[submodule "test_util/wpt"]
- path = test_util/wpt
- url = https://github.com/web-platform-tests/wpt.git
- shallow = true
[submodule "test_util/std"]
path = test_util/std
url = https://github.com/denoland/deno_std
shallow = true
+[submodule "test_util/wpt"]
+ path = test_util/wpt
+ url = https://github.com/web-platform-tests/wpt.git
diff --git a/test_util/wpt b/test_util/wpt
-Subproject 146f12e8df2cac6b1e60152145124a81dad60d3
+Subproject a8e5772a0f1c4d666acc5aee2423c38da7c9a71
diff --git a/tools/wpt.ts b/tools/wpt.ts
index 8f8248880..4a4d8cb58 100755
--- a/tools/wpt.ts
+++ b/tools/wpt.ts
@@ -80,27 +80,27 @@ More details at https://deno.land/manual@main/contributing/web_platform_tests
}
async function setup() {
+ const hostsPath = Deno.build.os == "windows"
+ ? `${Deno.env.get("SystemRoot")}\\System32\\drivers\\etc\\hosts`
+ : "/etc/hosts";
// TODO(lucacsonato): use this when 1.7.1 is released.
// const records = await Deno.resolveDns("web-platform.test", "A");
// const etcHostsConfigured = records[0] == "127.0.0.1";
- const hostsFile = await Deno.readTextFile("/etc/hosts");
+ const hostsFile = await Deno.readTextFile(hostsPath);
const etcHostsConfigured = hostsFile.includes("web-platform.test");
if (etcHostsConfigured) {
- console.log("/etc/hosts is already configured.");
+ console.log(hostsPath + " is already configured.");
} else {
const autoConfigure = autoConfig ||
confirm(
- "The WPT require certain entries to be present in your /etc/hosts file. Should these be configured automatically?",
+ `The WPT require certain entries to be present in your ${hostsPath} file. Should these be configured automatically?`,
);
if (autoConfigure) {
const proc = runPy(["wpt", "make-hosts-file"], { stdout: "piped" });
const status = await proc.status();
assert(status.success, "wpt make-hosts-file should not fail");
const entries = new TextDecoder().decode(await proc.output());
- const hostsPath = Deno.build.os == "windows"
- ? `${Deno.env.get("SystemRoot")}\\System32\\drivers\\etc\\hosts`
- : "/etc/hosts";
const file = await Deno.open(hostsPath, { append: true }).catch((err) => {
if (err instanceof Deno.errors.PermissionDenied) {
throw new Error(
@@ -116,9 +116,9 @@ async function setup() {
"\n\n# Configured for Web Platform Tests (Deno)\n" + entries,
),
);
- console.log("Updated /etc/hosts");
+ console.log(`Updated ${hostsPath}`);
} else {
- console.log("Please configure the /etc/hosts entries manually.");
+ console.log(`Please configure the ${hostsPath} entries manually.`);
if (Deno.build.os == "windows") {
console.log("To do this run the following command in PowerShell:");
console.log("");
diff --git a/tools/wpt/certs/index.txt b/tools/wpt/certs/index.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/tools/wpt/certs/index.txt
+++ /dev/null
diff --git a/tools/wpt/certs/serial b/tools/wpt/certs/serial
deleted file mode 100644
index e457acdd3..000000000
--- a/tools/wpt/certs/serial
+++ /dev/null
@@ -1 +0,0 @@
-026677 \ No newline at end of file
diff --git a/tools/wpt/config.json b/tools/wpt/config.json
index a27e0d15d..f146607c1 100644
--- a/tools/wpt/config.json
+++ b/tools/wpt/config.json
@@ -1,11 +1,6 @@
{
"check_subdomains": false,
"ssl": {
- "type": "openssl",
- "openssl": {
- "duration": 365,
- "force_regenerate": false,
- "base_path": "../../tools/wpt/certs"
- }
+ "type": "pregenerated"
}
}
diff --git a/tools/wpt/utils.ts b/tools/wpt/utils.ts
index 0eb9a89e7..f1c8488af 100644
--- a/tools/wpt/utils.ts
+++ b/tools/wpt/utils.ts
@@ -144,6 +144,7 @@ export async function checkPy3Available() {
}
export async function cargoBuild() {
+ if (binary) return;
const proc = Deno.run({
cmd: ["cargo", "build", ...(release ? ["--release"] : [])],
cwd: ROOT_PATH,