diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-10-01 12:39:10 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-10-01 12:39:10 -0600 |
commit | ba2714f4f607da77bd7200f88cfa16c1d10da9cd (patch) | |
tree | d2846004f8ca2887d70ab9c9f5a71ed1101b88c8 | |
parent | 9488013b59e54f9a39cc89362ee6b84f89cc8ed0 (diff) | |
parent | 9228b5011dc2fcfb80733f03e2d9420832ff0d59 (diff) | |
download | servo-ba2714f4f607da77bd7200f88cfa16c1d10da9cd.tar.gz servo-ba2714f4f607da77bd7200f88cfa16c1d10da9cd.zip |
Auto merge of #7813 - servo:parallel-unit-tests, r=mbrubeck
Run all unit tests with just one Cargo command.
Upgrade Cargo to get https://github.com/rust-lang/cargo/pull/1828, and use it for unit tests. This allows Cargo to get some more parallelism when compiling the test crates’ dependencies.
`touch components/util/lib.rs && mach test-unit` on my machine goes from 149 seconds to 124.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7813)
<!-- Reviewable:end -->
-rw-r--r-- | cargo-nightly-build | 2 | ||||
-rw-r--r-- | python/servo/testing_commands.py | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/cargo-nightly-build b/cargo-nightly-build index 8aaac9c27b2..cd3d0a1ea7d 100644 --- a/cargo-nightly-build +++ b/cargo-nightly-build @@ -1 +1 @@ -2015-08-20 +2015-10-01 diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index f6159406666..c9be0b02181 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -175,12 +175,13 @@ class MachCommands(CommandBase): if not packages: packages = set(os.listdir(path.join(self.context.topdir, "tests", "unit"))) + args = ["cargo", "test"] for crate in packages: - result = subprocess.call( - ["cargo", "test", "-p", "%s_tests" % crate] + test_patterns, - env=self.build_env(), cwd=self.servo_crate()) - if result != 0: - return result + args += ["-p", "%s_tests" % crate] + args += test_patterns + result = subprocess.call(args, env=self.build_env(), cwd=self.servo_crate()) + if result != 0: + return result @Command('test-ref', description='Run the reference tests', |