Bug 1068676 - Make mach test understand subsuites. r=jmaher
authorJ. Ryan Stinnett <jryans@gmail.com>
Fri, 06 Feb 2015 14:36:59 -0600
changeset 227866 de4682147093de05c0dc76cb9ea66b35ffe77739
parent 227865 9ebe4e3c108574196d551662e5c4cddc081dbe07
child 227867 3da0ac9c71d5a74ed24fa7c1870bf1dac777a776
push id11207
push userjryans@gmail.com
push dateFri, 06 Feb 2015 20:37:10 +0000
treeherderfx-team@de4682147093 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1068676
milestone38.0a1
Bug 1068676 - Make mach test understand subsuites. r=jmaher
testing/mach_commands.py
--- a/testing/mach_commands.py
+++ b/testing/mach_commands.py
@@ -213,35 +213,39 @@ class Test(MachCommandBase):
                     status = res
 
             elif 'make_target' in suite:
                 res = self._run_make(target=suite['make_target'],
                     pass_thru=True)
                 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
                 continue
 
             m = TEST_FLAVORS[flavor]
             if 'mach_command' not in m:
                 print(UNKNOWN_FLAVOR % flavor)
                 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
 
         return status
 
 
 @CommandProvider
 class MachCommands(MachCommandBase):