auto merge of #4269 : mttr/servo/mach_test_fix, r=mbrubeck

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.
This commit is contained in:
bors-servo 2014-12-06 13:49:03 -07:00
commit a6768b6244

View file

@ -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()