Bug 1144543 - Allow passing chunk options to emulator marionette tests r=jgriffin
authorjlal@mozilla.com
Wed, 18 Mar 2015 16:14:55 -0700 (2015-03-18)
changeset 3783 bb3a237c9116cdd7ef2278adc39642175278679a
parent 3782 8b5160fedec6ca3f30ff1d7754b16ad306a04f1b
child 3784 0c2502eda45498896c71e77dde977a9b995b37a3
push id2981
push userjlal@mozilla.com
push dateWed, 18 Mar 2015 23:15:19 +0000 (2015-03-18)
reviewersjgriffin
bugs1144543
Bug 1144543 - Allow passing chunk options to emulator marionette tests r=jgriffin
scripts/marionette.py
--- a/scripts/marionette.py
+++ b/scripts/marionette.py
@@ -349,16 +349,18 @@ class MarionetteTest(TestingMixin, Mercu
             'logcat_dir': dirs['abs_work_dir'],
             'emulator': self.config.get('emulator'),
             'symbols_path': self.symbols_path,
             'homedir': os.path.join(dirs['abs_emulator_dir'], 'b2g-distro'),
             'binary': self.binary_path,
             'address': self.config.get('marionette_address'),
             'raw_log_file': raw_log_file,
             'gecko_log': dirs["abs_blob_upload_dir"],
+            'this_chunk': self.config.get('this_chunk', 1),
+            'total_chunks': self.config.get('total_chunks', 1)
         }
 
         # build the marionette command arguments
         python = self.query_python_path('python')
 
         if self.config.get('gaiatest'):
             # make the gaia profile
             build_config = os.path.join(dirs['abs_gaia_dir'], 'tests',
@@ -395,24 +397,16 @@ class MarionetteTest(TestingMixin, Mercu
                 binary_path = os.path.dirname(self.binary_path)
                 if os.access(os.path.join(binary_path, 'b2g-bin'), os.F_OK):
                     # first, try to find and use b2g-bin
                     config_fmt_args['binary'] = os.path.join(binary_path, 'b2g-bin')
                 else:
                     # if b2g-bin cannot be found we must use just b2g
                     config_fmt_args['binary'] = os.path.join(binary_path, 'b2g')
 
-            if self.config.get('this_chunk') and self.config.get('total_chunks'):
-                config_fmt_args['this_chunk'] = self.config.get('this_chunk')
-                config_fmt_args['total_chunks'] = self.config.get('total_chunks')
-            else:
-                # pass 1 as default so that the config option is honoured
-                config_fmt_args['this_chunk'] = 1
-                config_fmt_args['total_chunks'] = 1
-
             # Bug 1046694
             # using a different manifest if a specific gip-suite is specified
             # --type parameter depends on gip-suite
             if self.config.get('gip_suite'):
                 manifest = os.path.join(dirs['abs_gaiatest_dir'], 'gaiatest', 'tests', self.config.get('gip_suite'),
                                         'manifest.ini')
                 if self.config.get('gip_suite') == "functional":
                     config_fmt_args['type'] = "b2g-external"