wpt: fix the path to wpt-prefs.json on WPT runner (#33220)

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Mukilan Thiyagarajan 2024-08-28 13:20:16 +05:30 committed by GitHub
parent 6de7848aff
commit 5092cece7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -490301,7 +490301,7 @@
[]
],
"executorservo.py": [
"90251c1e4c6b6ffd150184005466aecdc76d180d",
"a0deac318d07dc802cff3e956ad254bb6b340587",
[]
],
"executorservodriver.py": [

View file

@ -69,10 +69,11 @@ class ServoExecutor(ProcessTestExecutor):
def find_wpt_prefs(self):
default_path = os.path.join("resources", "wpt-prefs.json")
# The cwd is the servo repo for `./mach test-wpt`, but on WPT runners
# it is the virtual environment where the nightly is extracted. In the
# latter case, the cwd has the `servo` folder inside which we find the
# it is the WPT repo. The nightly tar is extracted inside the python
# virtual environment within the repo. This means that on WPT runners,
# the cwd has the `_venv/servo` directory inside which we find the
# binary and the 'resources' directory.
for dir in [".", "./servo"]:
for dir in [".", "./_venv/servo"]:
candidate = os.path.abspath(os.path.join(dir, default_path))
if os.path.isfile(candidate):
return candidate