diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-11-27 18:02:53 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2018-01-10 18:05:44 +0100 |
commit | 365a139716436bed8e6a178f4539e4a3d31099c4 (patch) | |
tree | 5cf0a6c5dbd499607519258ebf1ab99ddd66406d /python/servo/testing_commands.py | |
parent | 6dff251e35736fa74eaab6ddbc8b6ecec08ecf48 (diff) | |
download | servo-365a139716436bed8e6a178f4539e4a3d31099c4.tar.gz servo-365a139716436bed8e6a178f4539e4a3d31099c4.zip |
Use rustup.rs instead of custom bootstrap
Fixes #11361, closes #18874
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 8a8c41597b9..03d567786f6 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -34,7 +34,7 @@ from mach.decorators import ( from servo.command_base import ( BuildNotFound, CommandBase, - call, cd, check_call, set_osmesa_env, + call, check_call, set_osmesa_env, ) from servo.util import host_triple @@ -265,7 +265,7 @@ class MachCommands(CommandBase): features = self.servo_features() if len(packages) > 0: - args = ["cargo", "bench" if bench else "test"] + args = ["cargo", "bench" if bench else "test", "--manifest-path", self.servo_manifest()] for crate in packages: args += ["-p", "%s_tests" % crate] for crate in in_crate_packages: @@ -278,7 +278,7 @@ class MachCommands(CommandBase): if nocapture: args += ["--", "--nocapture"] - err = call(args, env=env, cwd=self.servo_crate()) + err = self.call_rustup_run(args, env=env) if err is not 0: return err @@ -290,17 +290,19 @@ class MachCommands(CommandBase): @CommandArgument('--release', default=False, action="store_true", help="Run with a release build of servo") def test_stylo(self, release=False, test_name=None): - self.set_use_stable_rust() + self.set_use_geckolib_toolchain() self.ensure_bootstrapped() env = self.build_env() env["RUST_BACKTRACE"] = "1" env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "target", "geckolib").encode("UTF-8") - args = (["cargo", "test", "-p", "stylo_tests"] + - (["--release"] if release else []) + (test_name or [])) - with cd(path.join("ports", "geckolib")): - return call(args, env=env) + args = ( + ["cargo", "test", "--manifest-path", self.geckolib_manifest(), "-p", "stylo_tests"] + + (["--release"] if release else []) + + (test_name or []) + ) + return self.call_rustup_run(args, env=env) @Command('test-content', description='Run the content tests', |