Skip to content

Commit

Permalink
servo: Merge #7813 - Run all unit tests with just one Cargo command (…
Browse files Browse the repository at this point in the history
…from servo:parallel-unit-tests); r=mbrubeck

Upgrade Cargo to get rust-lang/cargo#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.

Source-Repo: https://github.com/servo/servo
Source-Revision: ba2714f4f607da77bd7200f88cfa16c1d10da9cd

UltraBlame original commit: a747ff057fac88586b57a543cf00052e24c93afe
  • Loading branch information
marco-c committed Sep 30, 2019
1 parent 5fdfd7e commit 1d2a1af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion servo/cargo-nightly-build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2015-08-20
2015-10-01
11 changes: 6 additions & 5 deletions servo/python/servo/testing_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,13 @@ def test_unit(self, test_name=None, package=None):
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',
Expand Down

0 comments on commit 1d2a1af

Please sign in to comment.