Simplify Python code for running WPT tests

Combine `run.py` and `update.py` into `servowpt.py` in order to allow
them to share code. Import them directly into the mach script to avoid
having to call `compile` and `exec` on the code. This makes it clearer
how they are executed. In addition, move all of the setup into
`setupwpt.py` to avoid differences between tests executed via mach and
not. Finally, be more ambitious when detecting the build to use. If none
was specified, try to use the one that exists between "release" and
"debug."
This commit is contained in:
Martin Robinson 2023-01-13 10:39:06 +01:00
parent 633f14df11
commit 42c3d05d2b
5 changed files with 171 additions and 211 deletions

View file

@ -9,7 +9,7 @@ In particular, this folder contains:
* `config.ini`: some configuration for the web-platform-tests.
* `include.ini`: the subset of web-platform-tests we currently run.
* `run.py`: run the web-platform-tests in Servo.
* `servowpt.py`: run the web-platform-tests in Servo.
* `web-platform-tests`: copy of the web-platform-tests.
* `metadata`: expected failures for the web-platform-tests we run.
* `mozilla`: web-platform-tests that cannot be upstreamed.
@ -81,7 +81,7 @@ for more details).
Running the tests without mach
------------------------------
When avoiding `mach` for some reason, one can run `run.py`
When avoiding `mach` for some reason, one can run `servowpt.py`
directly. However, this requires that all the dependencies for
`wptrunner` are available in the current python environment.