From 72f3806fd8b228fd95fe05f0c158daaf74d1e127 Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Wed, 28 Aug 2024 09:43:05 +0000 Subject: [PATCH] wpt: fix the path to wpt-prefs.json on WPT runner (#33220) Signed-off-by: Mukilan Thiyagarajan --- tools/wptrunner/wptrunner/executors/executorservo.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/wptrunner/wptrunner/executors/executorservo.py b/tools/wptrunner/wptrunner/executors/executorservo.py index 90251c1e4c6b6f..a0deac318d07dc 100644 --- a/tools/wptrunner/wptrunner/executors/executorservo.py +++ b/tools/wptrunner/wptrunner/executors/executorservo.py @@ -69,10 +69,11 @@ def on_output(self, line): 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