From 2bdf84d5f755e94a2eef2856edad86f7f0f997bc Mon Sep 17 00:00:00 2001 From: Matthew Rasmus Date: Sat, 6 Dec 2014 09:23:10 -0800 Subject: [PATCH] Fix breakage of `./mach test` When running commands through Registrar.dispatch, mach does not behave in the same way it would as if it were running through the command line. Defaults normally provided through a combination of @CommandArgument and argparse magic are ignored. I have some ideas as to how to fix this, but until then, this will allow `./mach test` to run through test-unit properly. --- python/servo/testing_commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 0bedbdfe30e..57f432619a1 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -100,7 +100,10 @@ class MachCommands(CommandBase): help="Specific component to test") @CommandArgument('test_name', nargs=argparse.REMAINDER, help="Only run tests that match this pattern") - def test_unit(self, test_name, component=None): + def test_unit(self, test_name=None, component=None): + if test_name is None: + test_name = [] + self.ensure_bootstrapped() self.ensure_built_tests()