aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXidorn Quan <me@upsuper.org>2018-03-07 17:14:25 +1100
committerXidorn Quan <me@upsuper.org>2018-03-07 17:14:25 +1100
commit29d9c85c5699e5039dcc7bf7f3a9296f8548ae9a (patch)
treeaefb803b9666b483f30a88103fad97e7031a0e06
parent9eb417528b79415a9f04f337b701187ca4ffbdfd (diff)
downloadservo-29d9c85c5699e5039dcc7bf7f3a9296f8548ae9a.tar.gz
servo-29d9c85c5699e5039dcc7bf7f3a9296f8548ae9a.zip
Add wptserve into python import paths.
-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())