Bug 1068676 - Make mach test understand subsuites. r=jmaher

This commit is contained in:
J. Ryan Stinnett
2015-02-06 14:36:59 -06:00
parent bb7ee9f2fb
commit 4905b1d2b2

View File

@@ -218,11 +218,12 @@ class Test(MachCommandBase):
if res:
status = res
flavors = {}
buckets = {}
for test in run_tests:
flavors.setdefault(test['flavor'], []).append(test)
key = (test['flavor'], test['subsuite'])
buckets.setdefault(key, []).append(test)
for flavor, tests in sorted(flavors.items()):
for (flavor, subsuite), tests in sorted(buckets.items()):
if flavor not in TEST_FLAVORS:
print(UNKNOWN_FLAVOR % flavor)
status = 1
@@ -234,9 +235,12 @@ class Test(MachCommandBase):
status = 1
continue
kwargs = dict(m['kwargs'])
kwargs['subsuite'] = subsuite
res = self._mach_context.commands.dispatch(
m['mach_command'], self._mach_context,
test_objects=tests, **m['kwargs'])
test_objects=tests, **kwargs)
if res:
status = res