aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/testing_commands.py
diff options
context:
space:
mode:
authorwilmoz <wcubasalas@gmail.com>2015-08-11 00:17:12 -0500
committerwilmoz <wcubasalas@gmail.com>2015-08-11 11:30:06 -0500
commitdafe077280abeba72ce4704b553d5ec4cb8d424a (patch)
tree806c3dc262401e2e575a82e7047006d26446db31 /python/servo/testing_commands.py
parent210e068ac7e10fa50e2885d438c7a8bb2a6de53b (diff)
downloadservo-dafe077280abeba72ce4704b553d5ec4cb8d424a.tar.gz
servo-dafe077280abeba72ce4704b553d5ec4cb8d424a.zip
fixes test-wpt cannot be run from anywhere but the root
Diffstat (limited to 'python/servo/testing_commands.py')
-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: