Bug 1142050 - Make --chunk-by-runtime a no-op on esr38. a=test-only
authorJonathan Griffin <jgriffin@mozilla.com>
Wed, 08 Jul 2015 15:22:10 -0700
changeset 327990 f09937d1e4f2d59910007bbb799bf85147bd6fde
parent 327989 0e3d6a2dfceab4f36f0479d4b960b4cd172e83f7
child 327991 9d584ddc56231e10168643c4868d3444c4a9904d
push id10322
push userdteller@mozilla.com
push dateTue, 02 Feb 2016 12:05:39 +0000
reviewerstest-only
bugs1142050
milestone39.0.1
Bug 1142050 - Make --chunk-by-runtime a no-op on esr38. a=test-only
testing/mochitest/mochitest_options.py
--- a/testing/mochitest/mochitest_options.py
+++ b/testing/mochitest/mochitest_options.py
@@ -82,16 +82,22 @@ class MochitestOptions(optparse.OptionPa
           "default": None,
           }],
         [["--this-chunk"],
          {"type": "int",
           "dest": "thisChunk",
           "help": "which chunk to run",
           "default": None,
           }],
+        [["--chunk-by-runtime"],
+         {"action": "store_true",
+          "dest": "chunkByRuntime",
+          "help": "Group tests such that each chunk has roughly the same runtime.",
+          "default": False,
+          }],
         [["--chunk-by-dir"],
          {"type": "int",
           "dest": "chunkByDir",
           "help": "group tests together in the same chunk that are in the same top chunkByDir directories",
           "default": 0,
           }],
         [["--run-by-dir"],
          {"action": "store_true",
@@ -502,16 +508,23 @@ class MochitestOptions(optparse.OptionPa
         if options.totalChunks is not None and options.thisChunk is None:
             self.error(
                 "thisChunk must be specified when totalChunks is specified")
 
         if options.totalChunks:
             if not 1 <= options.thisChunk <= options.totalChunks:
                 self.error("thisChunk must be between 1 and totalChunks")
 
+
+        if options.chunkByRuntime:
+            # --chunk-by-runtime not supported on this branch; revert
+            # to --chunk-by-dir
+            options.chunkByRuntime = False
+            options.chunkByDir = 5
+
         if options.xrePath is None:
             # default xrePath to the app path if not provided
             # but only if an app path was explicitly provided
             if options.app != self.defaults['app']:
                 options.xrePath = os.path.dirname(options.app)
                 if mozinfo.isMac:
                     options.xrePath = os.path.join(
                         os.path.dirname(