auto merge of #5210 : GreenRecycleBin/servo/#4968, r=jdm

`./mach test tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/security_location_0.sub.htm` is still failing with the same message as reported in #3219.
This commit is contained in:
bors-servo 2015-03-16 11:42:59 -06:00
commit cf39c672b6
3 changed files with 14 additions and 4 deletions

View file

@ -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):

View file

@ -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):
@ -238,7 +238,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))