Bug 1068676 - Make mach test understand subsuites. r=jmaher
authorJ. Ryan Stinnett <jryans@gmail.com>
Fri, 06 Feb 2015 14:36:59 -0600
changeset 255084 de4682147093de05c0dc76cb9ea66b35ffe77739
parent 254994 9ebe4e3c108574196d551662e5c4cddc081dbe07
child 255085 3da0ac9c71d5a74ed24fa7c1870bf1dac777a776
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1068676
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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):