diff options
author | bors-servo <metajack+bors@gmail.com> | 2014-10-03 09:57:26 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2014-10-03 09:57:26 -0600 |
commit | d4e977a2be1f1fea81c32d1f7024b228cb161966 (patch) | |
tree | 95cb2d618f151e1e108838113ba71e93276b4850 /python/servo | |
parent | a2531cd8aa0463e0941229b2f89f1433ad5b5e5e (diff) | |
parent | 7f6f072b02a50a609ff03c4b095476c83ff4d60e (diff) | |
download | servo-d4e977a2be1f1fea81c32d1f7024b228cb161966.tar.gz servo-d4e977a2be1f1fea81c32d1f7024b228cb161966.zip |
auto merge of #3566 : metajack/servo/fixup-unit-tests, r=mbrubeck
This adds the subpackages to `./mach test-unit`.
Diffstat (limited to 'python/servo')
-rw-r--r-- | python/servo/testing_commands.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 3d20aeb27da..05242f7af5b 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -54,22 +54,27 @@ class MachCommands(CommandBase): print("Tests completed in %0.2fs" % elapsed) @Command('test-unit', - description='Run libservo unit tests', + description='Run unit tests', category='testing', allow_all_args=True) @CommandArgument('test_name', default=None, nargs="...", help="Only run tests that match this pattern") - @CommandArgument( - 'params', default=None, nargs="...", - help="Command-line arguments to be passed to the test harness") - def test_unit(self, test_name=None, params=None): - if params is None: - params = [] - if test_name is not None: - params.append(test_name) + def test_unit(self, test_name=None): + if test_name is None: + test_name = [] self.ensure_bootstrapped() self.ensure_built_tests() - return self.run_test("servo", params) + + ret = self.run_test("servo", test_name) != 0 + + def cargo_test(component): + return 0 != subprocess.call( + ["cargo", "test", "-p", component], env=self.build_env()) + + for component in os.listdir("components"): + ret = ret or cargo_test(component) + + return ret @Command('test-ref', description='Run the reference tests', |