aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/testing_commands.py
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2015-10-01 16:46:35 +0200
committerSimon Sapin <simon.sapin@exyr.org>2015-10-01 17:59:18 +0200
commit9228b5011dc2fcfb80733f03e2d9420832ff0d59 (patch)
treeb75b02733f4e26f1b95cede14163e39216fe9bc1 /python/servo/testing_commands.py
parente2048d57c4c0602c5a6b82db8cb76e6c3e5467fa (diff)
downloadservo-9228b5011dc2fcfb80733f03e2d9420832ff0d59.tar.gz
servo-9228b5011dc2fcfb80733f03e2d9420832ff0d59.zip
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.
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r--python/servo/testing_commands.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index e4c36236bd0..e279f1de6b9 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',