Bug 1647720 - Replace fission with fission-xorigin variant, for linux64 mochitest-plain only; r=ahal
authorGeoff Brown <gbrown@mozilla.com>
Thu, 23 Jul 2020 13:12:54 +0000
changeset 541822 0709b3d363e97993b6d6c9159ec44c58dd44d105
parent 541821 8262943652a0d26c330c31e2059705eb6284cd96
child 541823 40f693a5defc4d39308d2b8b0bdea6f5de28d094
push id37633
push userccoroiu@mozilla.com
push dateFri, 24 Jul 2020 09:32:06 +0000
treeherdermozilla-central@141543043270 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1647720
milestone80.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 1647720 - Replace fission with fission-xorigin variant, for linux64 mochitest-plain only; r=ahal Differential Revision: https://phabricator.services.mozilla.com/D84611
taskcluster/ci/config.yml
taskcluster/ci/test/mochitest.yml
taskcluster/taskgraph/transforms/tests.py
testing/mozharness/scripts/desktop_unittest.py
--- a/taskcluster/ci/config.yml
+++ b/taskcluster/ci/config.yml
@@ -46,16 +46,17 @@ treeherder:
         'Fxfn-l-1proc': 'Firefox functional tests (local) without e10s'
         'Fxfn-r': 'Firefox functional tests (remote)'
         'Fxfn-r-1proc': 'Firefox functional tests (remote) without e10s'
         'iris': 'Iris testing suite'
         'l10n-bump': 'L10n Bumper'
         'M': 'Mochitests'
         'M-1proc': 'Mochitests without e10s'
         'M-fis': 'Mochitests with fission enabled'
+        'M-fis-xorig': 'Mochitests with cross-origin and fission enabled'
         'M-gli': 'Mochitests with WebGL over IPC'
         'M-spi': 'Mochitests with socket process'
         'M-spi-1proc': 'Mochitests with socket process without e10s'
         'M-V-1proc': 'Mochitests on Valgrind without e10s'
         'MSI': 'Repack installers into MSIs'
         'MSIs': 'Signing of Repacked installers of MSIs'
         'R': 'Reftests'
         'R-1proc': 'Reftests without e10s'
--- a/taskcluster/ci/test/mochitest.yml
+++ b/taskcluster/ci/test/mochitest.yml
@@ -49,16 +49,21 @@ job-defaults:
                     - unittests/win_unittest.py
 
 mochitest-plain:
     description: "Mochitest plain run"
     treeherder-symbol: M()
     schedules-component: mochitest-plain
     loopback-video: true
     tier: default
+    variants:
+        by-test-platform:
+            linux1804-64/opt: ['fission-xorigin']
+            linux1804-64/debug: ['fission-xorigin']
+            default: ['fission']
     chunks:
         by-test-platform:
             android-em-7.*: 4
             linux.*/debug: 16
             linux.*64-asan/opt: 10
             linux.*64-tsan/opt: 20
             linux.*64-.*cov/opt: 10
             windows10-64-ccov/.*: 10
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -191,16 +191,34 @@ TEST_VARIANTS = {
             'fission-run-on-projects': [],
             'mozharness': {
                 'extra-options': ['--setpref=fission.autostart=true',
                                   '--setpref=dom.serviceWorkers.parent_intercept=true',
                                   '--setpref=browser.tabs.documentchannel=true'],
             },
         },
     },
+    'fission-xorigin': {
+        'description': "{description} with cross-origin and fission enabled",
+        'filterfn': fission_filter,
+        'suffix': 'fis-xorig',
+        'replace': {
+            'e10s': True,
+        },
+        'merge': {
+            # Ensures the default state is to not run anywhere.
+            'fission-run-on-projects': [],
+            'mozharness': {
+                'extra-options': ['--setpref=fission.autostart=true',
+                                  '--setpref=dom.serviceWorkers.parent_intercept=true',
+                                  '--setpref=browser.tabs.documentchannel=true',
+                                  '--enable-xorigin-tests'],
+            },
+        },
+    },
     'socketprocess': {
         'description': "{description} with socket process enabled",
         'suffix': 'spi',
         'merge': {
             'mozharness': {
                 'extra-options': [
                     '--setpref=media.peerconnection.mtransport_process=true',
                     '--setpref=network.process.enabled=true',
@@ -1339,17 +1357,18 @@ def split_variants(config, tasks):
 
 @transforms.add
 def handle_fission_attributes(config, tasks):
     """Handle run_on_projects for fission tasks."""
     for task in tasks:
         for attr in ('run-on-projects', 'tier'):
             fission_attr = task.pop('fission-{}'.format(attr), None)
 
-            if task['attributes'].get('unittest_variant') != 'fission' or fission_attr is None:
+            if (task['attributes'].get('unittest_variant') != 'fission-xorigin' and
+                task['attributes'].get('unittest_variant') != 'fission') or fission_attr is None:
                 continue
 
             task[attr] = fission_attr
 
         yield task
 
 
 @transforms.add
--- a/testing/mozharness/scripts/desktop_unittest.py
+++ b/testing/mozharness/scripts/desktop_unittest.py
@@ -164,16 +164,22 @@ class DesktopUnittest(TestingMixin, Merc
         [['--repeat', ], {
             "action": "store",
             "type": "int",
             "dest": "repeat",
             "default": 0,
             "help": "Repeat the tests the given number of times. Supported "
                     "by mochitest, reftest, crashtest, ignored otherwise."}
          ],
+        [["--enable-xorigin-tests"], {
+            "action": "store_true",
+            "dest": "enable_xorigin_tests",
+            "default": False,
+            "help": "Run tests in a cross origin iframe."}
+         ],
     ] + copy.deepcopy(testing_config_options) + \
         copy.deepcopy(code_coverage_config_options)
 
     def __init__(self, require_config_file=True):
         # abs_dirs defined already in BaseScript but is here to make pylint happy
         self.abs_dirs = None
         super(DesktopUnittest, self).__init__(
             config_options=self.config_options,
@@ -429,16 +435,19 @@ class DesktopUnittest(TestingMixin, Merc
                                  "mochitest.")
 
             if c['headless']:
                 base_cmd.append('--headless')
 
             if c['enable_webrender']:
                 base_cmd.append('--enable-webrender')
 
+            if c['enable_xorigin_tests']:
+                base_cmd.append('--enable-xorigin-tests')
+
             if c['extra_prefs']:
                 base_cmd.extend(['--setpref={}'.format(p) for p in c['extra_prefs']])
 
             # set pluginsPath
             abs_res_plugins_dir = os.path.join(abs_res_dir, 'plugins')
             str_format_values['test_plugin_path'] = abs_res_plugins_dir
 
             if suite_category not in c["suite_definitions"]: