mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
Add HOST_FILE environment variable for test-wpt
This commit is contained in:
parent
19cd87aefc
commit
0aa727e5b6
3 changed files with 14 additions and 4 deletions
|
@ -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):
|
||||
|
|
|
@ -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))
|
||||
|
|
6
tests/wpt/hosts
Normal file
6
tests/wpt/hosts
Normal file
|
@ -0,0 +1,6 @@
|
|||
127.0.0.1 web-platform.test
|
||||
127.0.0.1 www.web-platform.test
|
||||
127.0.0.1 www1.web-platform.test
|
||||
127.0.0.1 www2.web-platform.test
|
||||
127.0.0.1 xn--n8j6ds53lwwkrqhv28a.web-platform.test
|
||||
127.0.0.1 xn--lve-6lad.web-platform.test
|
Loading…
Add table
Add a link
Reference in a new issue