aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-08-12 00:13:35 -0600
committerbors-servo <metajack+bors@gmail.com>2015-08-12 00:13:35 -0600
commit6dad29eb433ca889091a923c2d861189ebb0643c (patch)
tree877695064757e888936e7b8be307224d412080e9
parentfa83cfb4b501d3731392ba82de76933416fc31a8 (diff)
parentdafe077280abeba72ce4704b553d5ec4cb8d424a (diff)
downloadservo-6dad29eb433ca889091a923c2d861189ebb0643c.tar.gz
servo-6dad29eb433ca889091a923c2d861189ebb0643c.zip
Auto merge of #7159 - wilmoz:master, r=Ms2ger
fixes test-wpt cannot be run from anywhere but the root Fixes #7085 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7159) <!-- Reviewable:end -->
-rw-r--r--python/servo/testing_commands.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 450fc4db455..e1a054d70b1 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -243,13 +243,13 @@ class MachCommands(CommandBase):
def test_wpt(self, **kwargs):
self.ensure_bootstrapped()
self.ensure_wpt_virtualenv()
- hosts_file_path = path.join('tests', 'wpt', 'hosts')
+ hosts_file_path = path.join(self.context.topdir, 'tests', 'wpt', 'hosts')
os.environ["hosts_file_path"] = hosts_file_path
kwargs["debug"] = not kwargs["release"]
- run_file = path.abspath(path.join("tests", "wpt", "run_wpt.py"))
+ run_file = path.abspath(path.join(self.context.topdir, "tests", "wpt", "run_wpt.py"))
run_globals = {"__file__": run_file}
execfile(run_file, run_globals)
return run_globals["run_tests"](**kwargs)
@@ -326,7 +326,7 @@ class MachCommands(CommandBase):
return run_globals["update_tests"](**kwargs)
def ensure_wpt_virtualenv(self):
- virtualenv_path = path.join("tests", "wpt", "_virtualenv")
+ virtualenv_path = path.join(self.context.topdir, "tests", "wpt", "_virtualenv")
python = self.get_exec("python2", "python")
if not os.path.exists(virtualenv_path):
@@ -342,9 +342,11 @@ class MachCommands(CommandBase):
from wptrunner.browsers import servo # noqa
except ImportError:
subprocess.check_call(["pip", "install", "-r",
- path.join("tests", "wpt", "harness", "requirements.txt")])
+ path.join(self.context.topdir, "tests", "wpt",
+ "harness", "requirements.txt")])
subprocess.check_call(["pip", "install", "-r",
- path.join("tests", "wpt", "harness", "requirements_servo.txt")])
+ path.join(self.context.topdir, "tests", "wpt",
+ "harness", "requirements_servo.txt")])
try:
import blessings
except ImportError: