Bug 1243083 - Enable e10s by default when running mochitests, r=jmaher
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 01 Apr 2016 10:59:12 -0400
changeset 331566 a470bcc2b2bea4f35d52687ef599acf3fe7c8090
parent 331565 c75bf5061b8649ff380aa4c1cd28fbbef0a18e3c
child 331567 108a50bd1e2aff467c9c6e4ab6af9c111b598412
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1243083
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1243083 - Enable e10s by default when running mochitests, r=jmaher MozReview-Commit-ID: NlTGwdQ2nw
browser/extensions/loop/run-all-loop-tests.sh
testing/mochitest/mochitest_options.py
testing/mochitest/runtests.py
testing/mozharness/scripts/desktop_unittest.py
toolkit/components/formautofill/test/loader_common.js
--- a/browser/extensions/loop/run-all-loop-tests.sh
+++ b/browser/extensions/loop/run-all-loop-tests.sh
@@ -32,17 +32,17 @@ TESTS="
   browser/base/content/test/general/browser_devices_get_user_media_about_urls.js
   browser/base/content/test/general/browser_parsable_css.js
 "
 
 # Due to bug 1209463, we need to split these up and run them individually to
 # ensure we stop and report that there's an error.
 for test in $TESTS
 do
-  ./mach mochitest $test
+  ./mach mochitest --disable-e10s $test
   # UITour & get user media aren't compatible with e10s currenly.
   if [ "$1" != "--skip-e10s" ] && \
      [ "$test" != "browser/components/uitour/test/browser_UITour_loop.js" ] && \
      [ "$test" != "browser/base/content/test/general/browser_devices_get_user_media_about_urls.js" ];
   then
-    ./mach mochitest --e10s $test
+    ./mach mochitest $test
   fi
 done
--- a/testing/mochitest/mochitest_options.py
+++ b/testing/mochitest/mochitest_options.py
@@ -383,27 +383,21 @@ class MochitestArguments(ArgumentContain
           }],
         [["--debug-on-failure"],
          {"action": "store_true",
           "default": False,
           "dest": "debugOnFailure",
           "help": "Breaks execution and enters the JS debugger on a test failure. Should "
                   "be used together with --jsdebugger."
           }],
-        [["--e10s"],
-         {"action": "store_true",
-          "default": False,
-          "help": "Run tests with electrolysis preferences and test filtering enabled.",
-          }],
         [["--disable-e10s"],
          {"action": "store_false",
-          "default": False,
+          "default": True,
           "dest": "e10s",
           "help": "Run tests with electrolysis preferences and test filtering disabled.",
-          "suppress": True,
           }],
         [["--store-chrome-manifest"],
          {"action": "store",
           "help": "Destination path to write a copy of any chrome manifest "
                   "written by the harness.",
           "default": None,
           "suppress": True,
           }],
@@ -788,18 +782,22 @@ class MochitestArguments(ArgumentContain
                     '--use-test-media-devices is only supported on Linux currently')
             for f in ['/usr/bin/gst-launch-0.10', '/usr/bin/pactl']:
                 if not os.path.isfile(f):
                     parser.error(
                         'Missing binary %s required for '
                         '--use-test-media-devices' % f)
 
         if options.nested_oop:
-            if not options.e10s:
-                options.e10s = True
+            options.e10s = True
+
+        # a11y and chrome tests don't run with e10s enabled in CI
+        if options.a11y or options.chrome:
+            options.e10s = False
+
         mozinfo.update({"e10s": options.e10s})  # for test manifest parsing.
 
         options.leakThresholds = {
             "default": options.defaultLeakThreshold,
             "tab": 10000,  # See dependencies of bug 1051230.
             # GMP rarely gets a log, but when it does, it leaks a little.
             "geckomediaplugin": 20000,
         }
@@ -1170,16 +1168,21 @@ class AndroidArguments(ArgumentContainer
 
         if options.robocopApk != "":
             if not os.path.exists(options.robocopApk):
                 parser.error(
                     "Unable to find robocop APK '%s'" %
                     options.robocopApk)
             options.robocopApk = os.path.abspath(options.robocopApk)
 
+        # Disable e10s by default on Android because we don't run Android
+        # e10s jobs anywhere yet.
+        options.e10s = False
+        mozinfo.update({'e10s': options.e10s})
+
         # allow us to keep original application around for cleanup while
         # running robocop via 'am'
         options.remoteappname = options.app
         return options
 
 
 container_map = {
     'generic': [MochitestArguments],
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -2331,16 +2331,17 @@ class MochitestDesktop(MochitestBase):
                 'port_timeout': options.marionette_port_timeout,
             }
 
             if options.marionette:
                 host, port = options.marionette.split(':')
                 marionette_args['host'] = host
                 marionette_args['port'] = int(port)
 
+            self.log.info("runtests.py | Running with e10s: {}".format(options.e10s))
             self.log.info("runtests.py | Running tests: start.\n")
             try:
                 status = self.runApp(testURL,
                                      self.browserEnv,
                                      options.app,
                                      profile=self.profile,
                                      extraArgs=options.browserArgs,
                                      utilityPath=options.utilityPath,
--- a/testing/mozharness/scripts/desktop_unittest.py
+++ b/testing/mozharness/scripts/desktop_unittest.py
@@ -28,16 +28,17 @@ from mozharness.mozilla.blob_upload impo
 from mozharness.mozilla.mozbase import MozbaseMixin
 from mozharness.mozilla.testing.codecoverage import (
     CodeCoverageMixin,
     code_coverage_config_options
 )
 from mozharness.mozilla.testing.testbase import TestingMixin, testing_config_options
 
 SUITE_CATEGORIES = ['gtest', 'cppunittest', 'jittest', 'mochitest', 'reftest', 'xpcshell', 'mozbase', 'mozmill']
+SUITE_DEFAULT_E10S = ['mochitest']
 
 # DesktopUnittest {{{1
 class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMixin, CodeCoverageMixin):
     config_options = [
         [['--mochitest-suite', ], {
             "action": "extend",
             "dest": "specified_mochitest_suites",
             "type": "string",
@@ -314,17 +315,19 @@ class DesktopUnittest(TestingMixin, Merc
                                           'gtest'),
             }
 
             # TestingMixin._download_and_extract_symbols() will set
             # self.symbols_path when downloading/extracting.
             if self.symbols_path:
                 str_format_values['symbols_path'] = self.symbols_path
 
-            if c['e10s']:
+            if suite_category in SUITE_DEFAULT_E10S and not c['e10s']:
+                base_cmd.append('--disable-e10s')
+            elif suite_category not in SUITE_DEFAULT_E10S and c['e10s']:
                 base_cmd.append('--e10s')
 
             if c.get('strict_content_sandbox'):
                 if suite_category == "mochitest":
                     base_cmd.append('--strict-content-sandbox')
                 else:
                     self.fatal("--strict-content-sandbox only works with mochitest suites.")
 
--- a/toolkit/components/formautofill/test/loader_common.js
+++ b/toolkit/components/formautofill/test/loader_common.js
@@ -36,29 +36,29 @@
  * processes at first.  Normally, at this point only the registration of test
  * cases happen.  When everything has finished loading, tests are started and
  * appropriately synchronized between processes.
  *
  * Tests can be declared using the add_task syntax:
  *
  * add_task(function* test_something () { ... });
  *   This adds a test either in the parent process or child process:
- *     - Parent: xpcshell, mochitest-chrome without --e10s, mochitest-browser
- *     - Child: mochitest-chrome with --e10s
- *   In the future, these might run in the child process for "xpcshell --e10s".
+ *     - Parent: xpcshell, mochitest-chrome --disable-e10s, mochitest-browser
+ *     - Child: mochitest-chrome with e10s
+ *   In the future, these might run in the child process for "xpcshell".
  *
  * add_task_in_parent_process(function* test_something () { ... });
  *   This test runs in the parent process, but the child process will wait for
  *   its completion before continuing with the next task.  This wait currently
- *   happens only in mochitest-chrome with --e10s, in other frameworks that run
+ *   happens only in mochitest-chrome with e10s, in other frameworks that run
  *   only in the parent process this is the same as a normal add_task.
  *
  * add_task_in_child_process(function* test_something () { ... });
  *   This test runs only in the child process.  This means that the test is not
- *   run unless this is an e10s test, currently mochitest-chrome with --e10s.
+ *   run unless this is an e10s test, currently mochitest-chrome with e10s.
  *
  * add_task_in_both_processes(function* test_something () { ... });
  *   Useful for initialization that must be done both in the parent and the
  *   child, like setting preferences.
  *
  * add_termination_task(function* () { ... });
  *   Registers a new asynchronous termination task.  This is executed after all
  *   test cases in the file finished, and always in the same process where the