From f76c38b13e6c9427e1b426dec160064aef985b08 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 3 Apr 2024 12:26:13 +1100 Subject: [PATCH] chore: ensure `python@3.11` is installed for WPT tests (#23195) This provides a more thorough check of whether the correct Python version is installed for running WPT tests. --- tests/wpt/runner/utils.ts | 4 ++-- tests/wpt/wpt.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/wpt/runner/utils.ts b/tests/wpt/runner/utils.ts index 5e3399fa73..47f9808332 100644 --- a/tests/wpt/runner/utils.ts +++ b/tests/wpt/runner/utils.ts @@ -141,10 +141,10 @@ export async function checkPy3Available() { assert(success, "failed to run python --version"); const output = new TextDecoder().decode(stdout); assert( - output.includes("Python 3."), + output.includes("Python 3.11"), `The ${ Deno.build.os == "windows" ? "python.exe" : "python3" - } in your path is not Python 3.`, + } in your path is not Python 3.11.x. See https://github.com/web-platform-tests/wpt/issues/44427 for more details.`, ); } diff --git a/tests/wpt/wpt.ts b/tests/wpt/wpt.ts index 35a7c1e799..056db5dc06 100755 --- a/tests/wpt/wpt.ts +++ b/tests/wpt/wpt.ts @@ -72,6 +72,7 @@ switch (command) { break; case "run": + await checkPy3Available(); await cargoBuild(); await run(); break;