diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-04-07 16:59:56 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2015-04-08 01:07:54 +0200 |
commit | ec28d9808014724eba54a448b36ae8cc556ef919 (patch) | |
tree | 6e9e0cdb205ca67a0c23ca65addee6eab030441b | |
parent | dc431c9bdb7a746b36a3084a80743df6700df9c8 (diff) | |
download | servo-ec28d9808014724eba54a448b36ae8cc556ef919.tar.gz servo-ec28d9808014724eba54a448b36ae8cc556ef919.zip |
Have `./mach test-unit` run nothing but `cargo test -p unit_tests`
All unit tests will move there, and it should be much faster to build
than every other crate together.
Fix #5291.
-rw-r--r-- | python/servo/testing_commands.py | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index b64d0030d18..e538c79c789 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -102,38 +102,17 @@ class MachCommands(CommandBase): @Command('test-unit', description='Run unit tests', category='testing') - @CommandArgument('--package', '-p', default=None, - help="Specific package to test") - @CommandArgument('--component', '-c', default=None, - help="Alias for --package") @CommandArgument('test_name', nargs=argparse.REMAINDER, help="Only run tests that match this pattern") def test_unit(self, test_name=None, component=None, package=None): if test_name is None: test_name = [] - if component is not None: - if package is not None: - print("Please use either -p or -c, not both.") - return 1 - package = component - self.ensure_bootstrapped() - def cargo_test(component): - return 0 != subprocess.call( - ["cargo", "test", "-p", component] - + test_name, env=self.build_env(), cwd=self.servo_crate()) - - if package is not None: - return cargo_test(package) - - self.ensure_built_tests() - ret = self.run_test("servo", test_name) != 0 - for c in os.listdir("components"): - if c != "servo": - ret = ret or cargo_test(c) - return ret + return 0 != subprocess.call( + ["cargo", "test", "-p", "unit_tests"] + + test_name, env=self.build_env(), cwd=self.servo_crate()) @Command('test-ref', description='Run the reference tests', |