aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-06-05 06:26:31 -0700
committerGitHub <noreply@github.com>2017-06-05 06:26:31 -0700
commita36edb9970dbb658c17c008cfb22a7dc4f3e76ce (patch)
tree7e176fc7705f555805708ae4d5c042ea1cdd4197
parente2ae3b683eefbdb58477d3b696304f0aff7ec6ef (diff)
parent06cdf7bb3b69d4c314eb0fdc8259a8820ff3dffd (diff)
downloadservo-a36edb9970dbb658c17c008cfb22a7dc4f3e76ce.tar.gz
servo-a36edb9970dbb658c17c008cfb22a7dc4f3e76ce.zip
Auto merge of #17163 - jgraham:gecko_wpt_update, r=jdm
Update mach bootstrap for changes to wpt harness path in gecko Gecko is now using the wpt harness under the wpt tools directory rather than a copy in an adjacent directory. Therefore the path to the requirements files, and the required model paths, have changed. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because it only affects the mach bootstrap script <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17163) <!-- Reviewable:end -->
-rw-r--r--python/mach_bootstrap.py29
1 files changed, 18 insertions, 11 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py
index a857889b84a..f34689993a7 100644
--- a/python/mach_bootstrap.py
+++ b/python/mach_bootstrap.py
@@ -14,11 +14,6 @@ SEARCH_PATHS = [
os.path.join("python", "tidy"),
]
-WPT_SEARCH_PATHS = [
- ".",
- "harness",
-]
-
# Individual files providing mach commands.
MACH_MODULES = [
os.path.join('python', 'servo', 'bootstrap_commands.py'),
@@ -106,7 +101,7 @@ def _get_virtualenv_script_dir():
return "bin"
-def wpt_path(topdir, paths, is_firefox):
+def wpt_path(is_firefox, topdir, *paths):
if is_firefox:
rel = os.path.join("..", "testing", "web-platform")
else:
@@ -115,6 +110,16 @@ def wpt_path(topdir, paths, is_firefox):
return os.path.join(topdir, rel, *paths)
+def wpt_harness_path(is_firefox, topdir, *paths):
+ wpt_root = wpt_path(is_firefox, topdir)
+ if is_firefox:
+ rel = os.path.join(wpt_root, "tests", "tools", "wptrunner")
+ else:
+ rel = os.path.join(wpt_root, "harness")
+
+ 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)
@@ -157,9 +162,9 @@ def _activate_virtualenv(topdir, is_firefox):
# and it will check for conflicts.
requirements_paths = [
os.path.join("python", "requirements.txt"),
- wpt_path(topdir, ("harness", "requirements.txt"), is_firefox),
- wpt_path(topdir, ("harness", "requirements_firefox.txt"), is_firefox),
- wpt_path(topdir, ("harness", "requirements_servo.txt"), is_firefox),
+ 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"),
]
if need_pip_upgrade:
@@ -257,8 +262,10 @@ def bootstrap(topdir):
raise AttributeError(key)
sys.path[0:0] = [os.path.join(topdir, path) for path in SEARCH_PATHS]
- sys.path[0:0] = [wpt_path(topdir, (path,), is_firefox)
- for path in WPT_SEARCH_PATHS]
+
+ sys.path[0:0] = [wpt_path(is_firefox, topdir),
+ wpt_harness_path(is_firefox, topdir)]
+
import mach.main
mach = mach.main.Mach(os.getcwd())
mach.populate_context_handler = populate_context