Bug 936278 - Pass through mach mochitest-remote options correctly. r=jgriffin
authorJed Davis <jld@mozilla.com>
Mon, 25 Nov 2013 09:12:50 -0500
changeset 157348 34cd985e104afa3f981fea819446ce2c665985ba
parent 157347 a16bce9ca6b6918a71db737d9250156db02fe552
child 157349 7c8fd7cafb8bafd36c057f9efe3bf8ab63d30c01
push id2718
push userryanvm@gmail.com
push dateMon, 25 Nov 2013 14:12:57 +0000
treeherderb2g-inbound@7c8fd7cafb8b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs936278
milestone28.0a1
Bug 936278 - Pass through mach mochitest-remote options correctly. r=jgriffin
testing/mochitest/mach_commands.py
--- a/testing/mochitest/mach_commands.py
+++ b/testing/mochitest/mach_commands.py
@@ -94,17 +94,19 @@ class MochitestRunner(MozbuildObject):
         build_path = os.path.join(self.topobjdir, 'build')
         if build_path not in sys.path:
             sys.path.append(build_path)
 
         self.tests_dir = os.path.join(self.topobjdir, '_tests')
         self.mochitest_dir = os.path.join(self.tests_dir, 'testing', 'mochitest')
         self.lib_dir = os.path.join(self.topobjdir, 'dist', 'lib')
 
-    def run_b2g_test(self, test_file=None, b2g_home=None, xre_path=None, **kwargs):
+    def run_b2g_test(self, test_file=None, b2g_home=None, xre_path=None,
+                     total_chunks=None, this_chunk=None, no_window=None,
+                     **kwargs):
         """Runs a b2g mochitest.
 
         test_file is a path to a test file. It can be a relative path from the
         top source directory, an absolute filename, or a directory containing
         test files.
         """
         # Need to call relpath before os.chdir() below.
         test_path = ''
@@ -139,16 +141,19 @@ class MochitestRunner(MozbuildObject):
             options.testPath = test_path
         elif conditions.is_b2g_desktop:
             options.testManifest = 'b2g-desktop.json'
         else:
             options.testManifest = 'b2g.json'
 
         for k, v in kwargs.iteritems():
             setattr(options, k, v)
+        options.noWindow = no_window
+        options.totalChunks = total_chunks
+        options.thisChunk = this_chunk
 
         options.consoleLevel = 'INFO'
         if conditions.is_b2g_desktop(self):
             if self.substs.get('ENABLE_MARIONETTE') != '1':
                 print(MARIONETTE_DISABLED % ('mochitest-b2g-desktop',
                                              self.mozconfig['path']))
                 return 1