Bug 1546100 - [mochitest] Error out when running 'a11y' or 'chrome' with e10s, r=jmaher
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 26 Apr 2019 18:25:21 +0000
changeset 530385 ce1c928fb0cd091b7d0dd3eea71a0d97bf0ac474
parent 530384 e47482b63074eaa04e31c74835a91c89a504afb8
child 530386 5d03854895fb371b5ed6c90fd42cd0f2d4c122d3
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1546100
milestone68.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 1546100 - [mochitest] Error out when running 'a11y' or 'chrome' with e10s, r=jmaher Previously we would silently change the value of "e10s" from False to True. This can cause confusion and lead people to falsely think mochitest-chrome/a11y work with e10s (they do not). Now we explicitly error out in this case. This might be slightly less convenient for the developer (e.g they might need to re-run the command), but the downside of needing to rerun a test command is less than the risk of misunderstanding what is being tested. Note: when running |mach test| or |mach mochitest| on a directory that contains both chrome/a11y and another suite, we'll still do the right thing and implicitly set "e10s=False". Differential Revision: https://phabricator.services.mozilla.com/D28538
testing/mochitest/mochitest_options.py
testing/mochitest/runtests.py
testing/mozbase/moztest/moztest/resolve.py
testing/mozharness/configs/unittests/linux_unittest.py
testing/mozharness/configs/unittests/mac_unittest.py
testing/mozharness/configs/unittests/win_unittest.py
--- a/testing/mochitest/mochitest_options.py
+++ b/testing/mochitest/mochitest_options.py
@@ -819,16 +819,21 @@ class MochitestArguments(ArgumentContain
             if not pactl:
                 parser.error(
                     'Missing binary pactl required for '
                     '--use-test-media-devices')
 
         if options.nested_oop:
             options.e10s = True
 
+        # The a11y and chrome flavors can't run with e10s.
+        if options.flavor in ('a11y', 'chrome') and options.e10s:
+            parser.error("mochitest-{} does not support e10s, try again with "
+                         "--disable-e10s.".format(options.flavor))
+
         options.leakThresholds = {
             "default": options.defaultLeakThreshold,
             "tab": options.defaultLeakThreshold,
             # GMP rarely gets a log, but when it does, it leaks a little.
             "gmplugin": 20000,
             "rdd": 400,
         }
 
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1061,17 +1061,16 @@ class MochitestDesktop(object):
         pathPieces = filename.split("/")
 
         return (testPattern.match(pathPieces[-1]) and
                 not re.search(r'\^headers\^$', filename))
 
     def setTestRoot(self, options):
         if options.flavor != 'plain':
             self.testRoot = options.flavor
-
         else:
             self.testRoot = self.TEST_PATH
         self.testRootAbs = os.path.join(SCRIPT_DIR, self.testRoot)
 
     def buildTestURL(self, options, scheme='http'):
         if scheme == 'https':
             testHost = "https://example.com:443"
         else:
@@ -2565,21 +2564,16 @@ toolbar#nav-bar {
         self.log.info(':::')
 
         return 0
 
     def runTests(self, options):
         """ Prepare, configure, run tests and cleanup """
         self.extraPrefs = parse_preferences(options.extraPrefs)
 
-        # a11y and chrome tests don't run with e10s enabled in CI. Need to set
-        # this here since |mach mochitest| sets the flavor after argument parsing.
-        if options.flavor in ('a11y', 'chrome'):
-            options.e10s = False
-
         # for test manifest parsing.
         mozinfo.update({
             "e10s": options.e10s,
             "headless": options.headless,
             "serviceworker_e10s": self.extraPrefs.get(
                 'dom.serviceWorkers.parent_intercept', False),
             "socketprocess_e10s": self.extraPrefs.get(
                 'network.process.enabled', False),
--- a/testing/mozbase/moztest/moztest/resolve.py
+++ b/testing/mozbase/moztest/moztest/resolve.py
@@ -71,17 +71,17 @@ TEST_SUITES = {
         'aliases': ('mn',),
         'mach_command': 'marionette-test',
         'kwargs': {'tests': None},
         'task_regex': ['marionette($|.*(-1|[^0-9])$)'],
     },
     'mochitest-a11y': {
         'aliases': ('a11y', 'ally'),
         'mach_command': 'mochitest',
-        'kwargs': {'flavor': 'a11y', 'test_paths': None},
+        'kwargs': {'flavor': 'a11y', 'test_paths': None, 'e10s': False},
         'task_regex': ['mochitest-a11y($|.*(-1|[^0-9])$)',
                        'test-verify($|.*(-1|[^0-9])$)'],
     },
     'mochitest-browser-chrome': {
         'aliases': ('bc', 'browser'),
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'browser-chrome', 'test_paths': None},
         'task_regex': ['mochitest-browser-chrome($|.*(-1|[^0-9])$)',
@@ -98,31 +98,31 @@ TEST_SUITES = {
         'aliases': ('ss', 'screenshots-chrome'),
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'browser-chrome', 'subsuite': 'screenshots', 'test_paths': None},
         'task_regex': ['browser-screenshots($|.*(-1|[^0-9])$)'],
     },
     'mochitest-chrome': {
         'aliases': ('mc',),
         'mach_command': 'mochitest',
-        'kwargs': {'flavor': 'chrome', 'test_paths': None},
+        'kwargs': {'flavor': 'chrome', 'test_paths': None, 'e10s': False},
         'task_regex': ['mochitest-chrome($|.*(-1|[^0-9])$)',
                        'test-verify($|.*(-1|[^0-9])$)'],
     },
     'mochitest-chrome-clipboard': {
         'aliases': ('cl', 'clipboard',),
         'mach_command': 'mochitest',
-        'kwargs': {'flavor': 'chrome', 'subsuite': 'clipboard', 'test_paths': None},
+        'kwargs': {'flavor': 'chrome', 'subsuite': 'clipboard', 'test_paths': None, 'e10s': False},
         'task_regex': ['mochitest-clipboard($|.*(-1|[^0-9])$)',
                        'test-verify($|.*(-1|[^0-9])$)'],
     },
     'mochitest-chrome-gpu': {
         'aliases': ('gpu',),
         'mach_command': 'mochitest',
-        'kwargs': {'flavor': 'chrome', 'subsuite': 'gpu', 'test_paths': None},
+        'kwargs': {'flavor': 'chrome', 'subsuite': 'gpu', 'test_paths': None, 'e10s': False},
         'task_regex': ['mochitest-gpu($|.*(-1|[^0-9])$)',
                        'test-verify($|.*(-1|[^0-9])$)'],
     },
     'mochitest-devtools-chrome': {
         'aliases': ('dt', 'devtools'),
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'browser-chrome', 'subsuite': 'devtools', 'test_paths': None},
         'task_regex': ['mochitest-devtools-chrome($|.*(-1|[^0-9])$)',
--- a/testing/mozharness/configs/unittests/linux_unittest.py
+++ b/testing/mozharness/configs/unittests/linux_unittest.py
@@ -157,18 +157,18 @@ config = {
                            "--timeout=900", "--max-timeouts=50"],
         "mochitest-plain": [],
         "mochitest-plain-gpu": ["--subsuite=gpu"],
         "mochitest-plain-clipboard": ["--subsuite=clipboard"],
         "mochitest-plain-chunked": ["--chunk-by-dir=4"],
         "mochitest-plain-chunked-coverage": ["--chunk-by-dir=4", "--timeout=1200"],
         "mochitest-media": ["--subsuite=media"],
         "mochitest-chrome": ["--flavor=chrome"],
-        "mochitest-chrome-gpu": ["--flavor=chrome", "--subsuite=gpu"],
-        "mochitest-chrome-clipboard": ["--flavor=chrome", "--subsuite=clipboard"],
+        "mochitest-chrome-gpu": ["--flavor=chrome", "--subsuite=gpu", "--disable-e10s"],
+        "mochitest-chrome-clipboard": ["--flavor=chrome", "--subsuite=clipboard", "--disable-e10s"],
         "mochitest-chrome-chunked": ["--flavor=chrome", "--chunk-by-dir=4"],
         "mochitest-browser-chrome": ["--flavor=browser"],
         "mochitest-browser-chrome-clipboard": ["--flavor=browser", "--subsuite=clipboard"],
         "mochitest-browser-chrome-chunked": ["--flavor=browser", "--chunk-by-runtime"],
         "mochitest-browser-chrome-coverage": ["--flavor=browser", "--chunk-by-runtime", "--timeout=1200"],
         "mochitest-browser-chrome-screenshots": ["--flavor=browser", "--subsuite=screenshots"],
         "mochitest-browser-chrome-instrumentation": ["--flavor=browser"],
         "mochitest-webgl1-core": ["--subsuite=webgl1-core"],
--- a/testing/mozharness/configs/unittests/mac_unittest.py
+++ b/testing/mozharness/configs/unittests/mac_unittest.py
@@ -122,18 +122,18 @@ config = {
     # local mochi suites
     "all_mochitest_suites": {
         "mochitest-plain": [],
         "mochitest-plain-gpu": ["--subsuite=gpu"],
         "mochitest-plain-clipboard": ["--subsuite=clipboard"],
         "mochitest-plain-chunked": ["--chunk-by-dir=4"],
         "mochitest-media": ["--subsuite=media"],
         "mochitest-chrome": ["--flavor=chrome"],
-        "mochitest-chrome-gpu": ["--flavor=chrome", "--subsuite=gpu"],
-        "mochitest-chrome-clipboard": ["--flavor=chrome", "--subsuite=clipboard"],
+        "mochitest-chrome-gpu": ["--flavor=chrome", "--subsuite=gpu", "--disable-e10s"],
+        "mochitest-chrome-clipboard": ["--flavor=chrome", "--subsuite=clipboard", "--disable-e10s"],
         "mochitest-chrome-chunked": ["--flavor=chrome", "--chunk-by-dir=4"],
         "mochitest-browser-chrome": ["--flavor=browser"],
         "mochitest-browser-chrome-clipboard": ["--flavor=browser", "--subsuite=clipboard"],
         "mochitest-browser-chrome-chunked": ["--flavor=browser", "--chunk-by-runtime"],
         "mochitest-browser-chrome-screenshots": ["--flavor=browser", "--subsuite=screenshots"],
         "mochitest-browser-chrome-instrumentation": ["--flavor=browser"],
         "mochitest-webgl1-core": ["--subsuite=webgl1-core"],
         "mochitest-webgl1-ext": ["--subsuite=webgl1-ext"],
--- a/testing/mozharness/configs/unittests/win_unittest.py
+++ b/testing/mozharness/configs/unittests/win_unittest.py
@@ -145,18 +145,18 @@ config = {
     "all_mochitest_suites":
     {
         "mochitest-plain": [],
         "mochitest-plain-gpu": ["--subsuite=gpu"],
         "mochitest-plain-clipboard": ["--subsuite=clipboard"],
         "mochitest-plain-chunked": ["--chunk-by-dir=4"],
         "mochitest-media": ["--subsuite=media"],
         "mochitest-chrome": ["--flavor=chrome"],
-        "mochitest-chrome-gpu": ["--flavor=chrome", "--subsuite=gpu"],
-        "mochitest-chrome-clipboard": ["--flavor=chrome", "--subsuite=clipboard"],
+        "mochitest-chrome-gpu": ["--flavor=chrome", "--subsuite=gpu", "--disable-e10s"],
+        "mochitest-chrome-clipboard": ["--flavor=chrome", "--subsuite=clipboard", "--disable-e10s"],
         "mochitest-chrome-chunked": ["--flavor=chrome", "--chunk-by-dir=4"],
         "mochitest-browser-chrome": ["--flavor=browser"],
         "mochitest-browser-chrome-clipboard": ["--flavor=browser", "--subsuite=clipboard"],
         "mochitest-browser-chrome-chunked": ["--flavor=browser", "--chunk-by-runtime"],
         "mochitest-browser-chrome-screenshots": ["--flavor=browser", "--subsuite=screenshots"],
         "mochitest-browser-chrome-instrumentation": ["--flavor=browser"],
         "mochitest-webgl1-core": ["--subsuite=webgl1-core"],
         "mochitest-webgl1-ext": ["--subsuite=webgl1-ext"],