aboutsummaryrefslogtreecommitdiffstats
path: root/python/mach_bootstrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/mach_bootstrap.py')
-rw-r--r--python/mach_bootstrap.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py
index 0f7e1ac6882..4bbd1fe7d95 100644
--- a/python/mach_bootstrap.py
+++ b/python/mach_bootstrap.py
@@ -131,7 +131,7 @@ def wpt_path(is_firefox, topdir, *paths):
return os.path.join(topdir, rel, *paths)
-def wpt_harness_path(is_firefox, topdir, *paths):
+def wptrunner_path(is_firefox, topdir, *paths):
wpt_root = wpt_path(is_firefox, topdir)
if is_firefox:
rel = os.path.join(wpt_root, "tests", "tools", "wptrunner")
@@ -141,6 +141,16 @@ def wpt_harness_path(is_firefox, topdir, *paths):
return os.path.join(topdir, rel, *paths)
+def wptserve_path(is_firefox, topdir, *paths):
+ wpt_root = wpt_path(is_firefox, topdir)
+ if is_firefox:
+ rel = os.path.join(wpt_root, "tests", "tools", "wptserve")
+ else:
+ rel = os.path.join(wpt_root, "web-platform-tests", "tools", "wptserve")
+
+ return os.path.join(topdir, rel, *paths)
+
+
def _activate_virtualenv(topdir, is_firefox):
virtualenv_path = os.path.join(topdir, "python", "_virtualenv")
check_exec_path = lambda path: path.startswith(virtualenv_path)
@@ -175,9 +185,9 @@ def _activate_virtualenv(topdir, is_firefox):
# and it will check for conflicts.
requirements_paths = [
os.path.join("python", "requirements.txt"),
- wpt_harness_path(is_firefox, topdir, "requirements.txt",),
- wpt_harness_path(is_firefox, topdir, "requirements_firefox.txt"),
- wpt_harness_path(is_firefox, topdir, "requirements_servo.txt"),
+ wptrunner_path(is_firefox, topdir, "requirements.txt",),
+ wptrunner_path(is_firefox, topdir, "requirements_firefox.txt"),
+ wptrunner_path(is_firefox, topdir, "requirements_servo.txt"),
]
if need_pip_upgrade:
@@ -267,7 +277,8 @@ def bootstrap(topdir):
sys.path[0:0] = [os.path.join(topdir, path) for path in SEARCH_PATHS]
sys.path[0:0] = [wpt_path(is_firefox, topdir),
- wpt_harness_path(is_firefox, topdir)]
+ wptrunner_path(is_firefox, topdir),
+ wptserve_path(is_firefox, topdir)]
import mach.main
mach = mach.main.Mach(os.getcwd())