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.
This commit is contained in:
Asher Gomez 2024-04-03 12:26:13 +11:00 committed by GitHub
parent 57572dafd5
commit f76c38b13e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -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.`,
);
}

View file

@ -72,6 +72,7 @@ switch (command) {
break;
case "run":
await checkPy3Available();
await cargoBuild();
await run();
break;