diff options
author | Daniel Le <greenrecyclebin@gmail.com> | 2015-03-14 18:45:34 +0800 |
---|---|---|
committer | Daniel Le <greenrecyclebin@gmail.com> | 2015-03-14 18:45:34 +0800 |
commit | 0aa727e5b6437e3b1dc5377ba932c15f4b7b41c6 (patch) | |
tree | 048360a92237dfde99f41e2e1c423fb35f9618c1 /python/servo | |
parent | 19cd87aefc24fa153fa013b5f96ae46de9a427fd (diff) | |
download | servo-0aa727e5b6437e3b1dc5377ba932c15f4b7b41c6.tar.gz servo-0aa727e5b6437e3b1dc5377ba932c15f4b7b41c6.zip |
Add HOST_FILE environment variable for test-wpt
Diffstat (limited to 'python/servo')
-rw-r--r-- | python/servo/command_base.py | 5 | ||||
-rw-r--r-- | python/servo/testing_commands.py | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index b8474c85044..5075cad6487 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -120,7 +120,7 @@ class CommandBase(object): self._cargo_build_id = open(filename).read().strip() return self._cargo_build_id - def build_env(self, gonk=False): + def build_env(self, gonk=False, hosts_file_path=None): """Return an extended environment dictionary.""" env = os.environ.copy() extra_path = [] @@ -206,6 +206,9 @@ class CommandBase(object): if "ANDROID_TOOLCHAIN" in env: env["NDK_STANDALONE"] = env["ANDROID_TOOLCHAIN"] + if hosts_file_path: + env['HOST_FILE'] = hosts_file_path + return env def servo_crate(self): diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 95dd71af1e9..ac1c2b13f49 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -30,8 +30,8 @@ class MachCommands(CommandBase): if self.context.built_tests: return returncode = Registrar.dispatch('build-tests', context=self.context) - if returncode: - sys.exit(returncode) + if returncode: + sys.exit(returncode) self.context.built_tests = True def find_test(self, prefix): @@ -235,7 +235,8 @@ class MachCommands(CommandBase): processes = str(multiprocessing.cpu_count()) if processes is None else processes params = params + ["--processes", processes] + hosts_file_path = path.join('tests', 'wpt', 'hosts') return subprocess.call( ["bash", path.join("tests", "wpt", "run.sh")] + params, - env=self.build_env()) + env=self.build_env(hosts_file_path=hosts_file_path)) |