Bug 1153413 - Add --subsuite option to mochitest mach command, r=jgriffin
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 10 Apr 2015 15:31:36 -0400
changeset 257913 a69a27360be41e3130f5723a447973c54ba0c85e
parent 257912 c2f12ead270c4a80ae3e63c54f2a613d34717438
child 257914 eb7ef6324ddb8ab94309483d5ee877ee80c2b1a1
push id8007
push userraliiev@mozilla.com
push dateMon, 11 May 2015 19:23:16 +0000
treeherdermozilla-aurora@e2ce1aac996e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs1153413
milestone40.0a1
Bug 1153413 - Add --subsuite option to mochitest mach command, r=jgriffin
testing/mochitest/mach_commands.py
--- a/testing/mochitest/mach_commands.py
+++ b/testing/mochitest/mach_commands.py
@@ -333,17 +333,16 @@ class MochitestRunner(MozbuildObject):
             flavor = 'mochitest'
         elif suite == 'chrome':
             options.chrome = True
         elif suite == 'browser':
             options.browserChrome = True
             flavor = 'browser-chrome'
         elif suite == 'devtools':
             options.browserChrome = True
-            options.subsuite = 'devtools'
         elif suite == 'jetpack-package':
             options.jetpackPackage = True
         elif suite == 'jetpack-addon':
             options.jetpackAddon = True
         elif suite == 'metro':
             options.immersiveMode = True
             options.browserChrome = True
         elif suite == 'a11y':
@@ -406,16 +405,19 @@ class MochitestRunner(MozbuildObject):
             options.extensionsToInstall = [
                 os.path.join(
                     self.topsrcdir,
                     install_extension)]
 
         for k, v in kwargs.iteritems():
             setattr(options, k, v)
 
+        if suite == 'devtools':
+            options.subsuite = 'devtools'
+
         if test_paths:
             resolver = self._spawn(TestResolver)
 
             tests = list(
                 resolver.resolve_tests(
                     paths=test_paths,
                     flavor=flavor))
 
@@ -726,16 +728,23 @@ def add_mochitest_general_args(parser):
 
     parser.add_argument(
         "--tag",
         dest='test_tags', action='append',
         help="Filter out tests that don't have the given tag. Can be used "
              "multiple times in which case the test must contain at least one "
              "of the given tags.")
 
+    parser.add_argument(
+        "--subsuite",
+        default=None,
+        help="Subsuite of tests to run. Unlike tags, subsuites also remove "
+             "tests from the default set. Only one can be specified at once.")
+
+
     return parser
 
 def add_mochitest_b2g_args(parser):
     parser.add_argument(
         '--busybox',
         default=None,
         help='Path to busybox binary to install on device')