Bug 1243083 - Enable e10s by default when running marionette tests, r?ato draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 01 Apr 2016 11:01:57 -0400
changeset 346782 2ae877ede8ae659eaab3dfc9b12dbdbd91eb6245
parent 346781 a13b4fb65391b4e85eacfdefb19a0c85ddfa0269
child 346783 c2d3f5de7142a8085458d724735093e5ec2747ab
push id14440
push userahalberstadt@mozilla.com
push dateFri, 01 Apr 2016 15:37:30 +0000
reviewersato
bugs1243083
milestone48.0a1
Bug 1243083 - Enable e10s by default when running marionette tests, r?ato MozReview-Commit-ID: NlTGwdQ2nw
testing/marionette/harness/marionette/runner/base.py
testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py
testing/mozharness/scripts/marionette.py
--- a/testing/marionette/harness/marionette/runner/base.py
+++ b/testing/marionette/harness/marionette/runner/base.py
@@ -403,20 +403,21 @@ class BaseMarionetteArguments(ArgumentPa
                         default=False,
                         help='Enable the jsdebugger for marionette javascript.')
         self.add_argument('--pydebugger',
                         help='Enable python post-mortem debugger when a test fails.'
                              ' Pass in the debugger you want to use, eg pdb or ipdb.')
         self.add_argument('--socket-timeout',
                         default=self.socket_timeout_default,
                         help='Set the global timeout for marionette socket operations.')
-        self.add_argument('--e10s',
-                        action='store_true',
-                        default=False,
-                        help='Enable e10s when running marionette tests.')
+        self.add_argument('--disable-e10s',
+                        action='store_false',
+                        dest='e10s',
+                        default=True,
+                        help='Disable e10s when running marionette tests.')
         self.add_argument('--tag',
                         action='append', dest='test_tags',
                         default=None,
                         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.")
         self.add_argument('--workspace',
                           action='store',
@@ -533,17 +534,17 @@ class BaseMarionetteTestRunner(object):
                  repeat=0, testvars=None, tree=None, type=None,
                  device_serial=None, symbols_path=None, timeout=None,
                  shuffle=False, shuffle_seed=random.randint(0, sys.maxint),
                  sdcard=None, this_chunk=1, total_chunks=1, sources=None,
                  server_root=None, gecko_log=None, result_callbacks=None,
                  adb_host=None, adb_port=None, prefs=None, test_tags=None,
                  socket_timeout=BaseMarionetteArguments.socket_timeout_default,
                  startup_timeout=None, addons=None, workspace=None,
-                 verbose=0, **kwargs):
+                 verbose=0, e10s=True, **kwargs):
         self.address = address
         self.emulator = emulator
         self.emulator_binary = emulator_binary
         self.emulator_img = emulator_img
         self.emulator_res = emulator_res
         self.homedir = homedir
         self.app = app
         self.app_args = app_args or []
@@ -584,16 +585,17 @@ class BaseMarionetteTestRunner(object):
         self.prefs = prefs or {}
         self.test_tags = test_tags
         self.startup_timeout = startup_timeout
         self.workspace = workspace
         # If no workspace is set, default location for logcat and gecko.log is .
         # and default location for profile is TMP
         self.workspace_path = workspace or os.getcwd()
         self.verbose = verbose
+        self.e10s = e10s
 
         def gather_debug(test, status):
             rv = {}
             marionette = test._marionette_weakref()
 
             # In the event we're gathering debug without starting a session, skip marionette commands
             if marionette.session is not None:
                 try:
@@ -875,16 +877,17 @@ setReq.onerror = function() {
         invalid_tests = \
             [t['filepath'] for t in self.tests
              if not os.path.basename(t['filepath']).startswith('test_')]
         if invalid_tests:
             raise Exception("Tests file names must starts with 'test_'."
                             " Invalid test names:\n  %s"
                             % '\n  '.join(invalid_tests))
 
+        self.logger.info("running with e10s: {}".format(self.e10s))
         version_info = mozversion.get_version(binary=self.bin,
                                               sources=self.sources,
                                               dm_type=os.environ.get('DM_TRANS', 'adb'),
                                               device_serial=self.device_serial,
                                               adb_host=self.marionette.adb_host,
                                               adb_port=self.marionette.adb_port)
 
         self.logger.suite_start(self.tests,
@@ -955,16 +958,17 @@ setReq.onerror = function() {
 
         self.marionette.cleanup()
 
         for run_tests in self.mixin_run_tests:
             run_tests(tests)
         if self.shuffle:
             self.logger.info("Using seed where seed is:%d" % self.shuffle_seed)
 
+        self.logger.info('mode: {}'.format('e10s' if self.e10s else 'non-e10s'))
         self.logger.suite_end()
 
     def start_httpd(self, need_external_ip):
         warnings.warn("start_httpd has been deprecated in favour of create_httpd",
             DeprecationWarning)
         self.httpd = self.create_httpd(need_external_ip)
 
     def create_httpd(self, need_external_ip):
@@ -1005,25 +1009,24 @@ setReq.onerror = function() {
 
         if file_ext == '.ini':
             manifest = TestManifest()
             manifest.read(filepath)
 
             filters = []
             if self.test_tags:
                 filters.append(tags(self.test_tags))
-            e10s = self.appinfo.get('browserTabsRemoteAutostart', False)
             json_path = update_mozinfo(filepath)
             self.logger.info("mozinfo updated with the following: {}".format(None))
             manifest_tests = manifest.active_tests(exists=False,
                                                    disabled=True,
                                                    filters=filters,
                                                    device=self.device,
                                                    app=self.appName,
-                                                   e10s=e10s,
+                                                   e10s=self.e10s,
                                                    **mozinfo.info)
             if len(manifest_tests) == 0:
                 self.logger.error("no tests to run using specified "
                                   "combination of filters: {}".format(
                                        manifest.fmt_filters()))
 
             unfiltered_tests = []
             for test in manifest_tests:
--- a/testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py
+++ b/testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py
@@ -205,18 +205,18 @@ class FirefoxMediaTestsBase(TestingMixin
         if self.symbols_path:
             cmd += ['--symbols-path', self.symbols_path]
         if self.media_urls:
             cmd += ['--urls', self.media_urls]
         if self.profile:
             cmd += ['--profile', self.profile]
         if self.tests:
             cmd.append(self.tests)
-        if self.e10s:
-            cmd.append('--e10s')
+        if not self.e10s:
+            cmd.append('--disable-e10s')
         if self.browsermob_script:
             cmd += ['--browsermob-script', self.browsermob_script]
         if self.browsermob_port:
             cmd += ['--browsermob-port', self.browsermob_port]
 
         test_suite = self.config.get('test_suite')
         if test_suite not in self.config["suite_definitions"]:
             self.fatal("%s is not defined in the config!" % test_suite)
--- a/testing/mozharness/scripts/marionette.py
+++ b/testing/mozharness/scripts/marionette.py
@@ -135,16 +135,17 @@ class MarionetteTest(TestingMixin, Mercu
         {"action": "store",
          "dest": "this_chunk",
          "help": "Number of this chunk",
         }
      ], [
         ["--e10s"],
         {"action": "store_true",
          "dest": "e10s",
+         "default": False,
          "help": "Run tests with multiple processes. (Desktop builds only)",
         }
      ]] + copy.deepcopy(testing_config_options) \
         + copy.deepcopy(blobupload_config_options)
 
     error_list = [
         {'substr': 'FAILED (errors=', 'level': WARNING},
         {'substr': r'''Could not successfully complete transport of message to Gecko, socket closed''', 'level': ERROR},
@@ -413,18 +414,18 @@ class MarionetteTest(TestingMixin, Mercu
                                               'runtests.py')]
 
             manifest = os.path.join(dirs['abs_marionette_tests_dir'],
                                     self.config['test_manifest'])
 
             if self.config.get('app_arg'):
                 config_fmt_args['app_arg'] = self.config['app_arg']
 
-            if self.config.get('e10s'):
-                cmd.append('--e10s')
+            if not self.config['e10s']:
+                cmd.append('--disable-e10s')
 
             cmd.append('--gecko-log=%s' % os.path.join(dirs["abs_blob_upload_dir"],
                                                        'gecko.log'))
 
         if self.config.get("structured_output"):
             config_fmt_args["raw_log_file"]= "-"
 
         options_group = self._get_options_group(self.config.get('emulator'),