win32: mach and build command fixes

- Add SERVO_USE_NIGHTLY_RUST env var to use the latest rust/cargo nightly snapshot
- Fix up looking for cargo binary (in cargo/bin/cargo, not bin/cargo)
- Fix up win32 executable checking (use .exe suffix)
- fix up win32 PATH handling (subprocess must use shell=True for PATH change to be honored)
This commit is contained in:
Vladimir Vukicevic 2015-09-22 15:09:54 -04:00 committed by Lars Bergstrom
parent 77aea599c7
commit ee863fde59
6 changed files with 74 additions and 49 deletions

View file

@ -26,7 +26,7 @@ from mach.decorators import (
Command,
)
from servo.command_base import CommandBase
from servo.command_base import CommandBase, call, check_call
from wptrunner import wptcommandline
from update import updatecommandline
import tidy
@ -78,7 +78,7 @@ class MachCommands(CommandBase):
def run_test(self, prefix, args=[], release=False):
t = self.find_test(prefix, release=release)
if t:
return subprocess.call([t] + args, env=self.build_env())
return call([t] + args, env=self.build_env())
@Command('test',
description='Run all Servo tests',
@ -203,7 +203,7 @@ class MachCommands(CommandBase):
for crate in packages:
args += ["-p", "%s_tests" % crate]
args += test_patterns
result = subprocess.call(args, env=self.build_env(), cwd=self.servo_crate())
result = call(args, env=self.build_env(), cwd=self.servo_crate())
if result != 0:
return result
@ -237,7 +237,7 @@ class MachCommands(CommandBase):
category='testing')
def test_wpt_failure(self):
self.ensure_bootstrapped()
return not subprocess.call([
return not call([
"bash",
path.join("tests", "wpt", "run.sh"),
"--no-pause-after-test",
@ -395,17 +395,17 @@ class MachCommands(CommandBase):
# Clone the jQuery repository if it doesn't exist
if not os.path.isdir(jquery_dir):
subprocess.check_call(
check_call(
["git", "clone", "-b", "servo", "--depth", "1", "https://github.com/servo/jquery", jquery_dir])
# Run pull in case the jQuery repo was updated since last test run
subprocess.check_call(
check_call(
["git", "-C", jquery_dir, "pull"])
# Check that a release servo build exists
bin_path = path.abspath(self.get_binary_path(release, dev))
return subprocess.check_call(
return check_call(
[run_file, cmd, bin_path, base_dir])
def dromaeo_test_runner(self, tests, release, dev):
@ -416,21 +416,21 @@ class MachCommands(CommandBase):
# Clone the Dromaeo repository if it doesn't exist
if not os.path.isdir(dromaeo_dir):
subprocess.check_call(
check_call(
["git", "clone", "-b", "servo", "--depth", "1", "https://github.com/notriddle/dromaeo", dromaeo_dir])
# Run pull in case the Dromaeo repo was updated since last test run
subprocess.check_call(
check_call(
["git", "-C", dromaeo_dir, "pull"])
# Compile test suite
subprocess.check_call(
check_call(
["make", "-C", dromaeo_dir, "web"])
# Check that a release servo build exists
bin_path = path.abspath(self.get_binary_path(release, dev))
return subprocess.check_call(
return check_call(
[run_file, "|".join(tests), bin_path, base_dir])