diff options
author | Matthew Rasmus <mattr@zzntd.com> | 2014-12-06 09:23:10 -0800 |
---|---|---|
committer | Matthew Rasmus <mattr@zzntd.com> | 2014-12-06 09:23:10 -0800 |
commit | 2bdf84d5f755e94a2eef2856edad86f7f0f997bc (patch) | |
tree | 377fb23ed635d1212301b296b7a9a91a92d3eae8 /python/servo/testing_commands.py | |
parent | c68e2af0a756280a687511614e44652906c0d7a1 (diff) | |
download | servo-2bdf84d5f755e94a2eef2856edad86f7f0f997bc.tar.gz servo-2bdf84d5f755e94a2eef2856edad86f7f0f997bc.zip |
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.
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 5 |
1 files changed, 4 insertions, 1 deletions
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() |