Bug 1374748 - Use regular builds for Stylo via env var. r=catlee draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 11 Jul 2017 13:39:22 -0500
changeset 610922 cd7ff7f3f4ab3c12fe4b712b060450d926bd25bf
parent 610649 dece50457378ac4934afe9fb3c2a8054e8894588
child 638001 e0cb77385cde4228468ff4df95338b706d2cf529
push id69049
push userbmo:jryans@gmail.com
push dateTue, 18 Jul 2017 23:32:33 +0000
reviewerscatlee
bugs1374748
milestone56.0a1
Bug 1374748 - Use regular builds for Stylo via env var. r=catlee MozReview-Commit-ID: BCMAuSRH1sQ
taskcluster/ci/build/linux.yml
taskcluster/ci/test/test-platforms.yml
taskcluster/taskgraph/transforms/tests.py
testing/mozharness/mozharness/mozilla/testing/talos.py
testing/mozharness/scripts/desktop_unittest.py
testing/mozharness/scripts/web_platform_tests.py
--- a/taskcluster/ci/build/linux.yml
+++ b/taskcluster/ci/build/linux.yml
@@ -418,70 +418,16 @@ linux64-nightly/opt:
             - builds/releng_base_linux_64_builds.py
             - disable_signing.py
             - taskcluster_nightly.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         tooltool-downloads: public
         need-xvfb: true
 
-linux64-stylo/opt:
-    description: "Linux64 Opt Stylo"
-    index:
-        product: firefox
-        job-name: linux64-stylo-opt
-    treeherder:
-        platform: linux64-stylo/opt
-        symbol: tc(B)
-        tier: 2
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 3600
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/releng.manifest"
-    run:
-        using: mozharness
-        actions: [get-secrets build check-test update]
-        config:
-            - builds/releng_base_linux_64_builds.py
-            - balrog/production.py
-        script: "mozharness/scripts/fx_desktop_build.py"
-        secrets: true
-        custom-build-variant-cfg: stylo
-        tooltool-downloads: public
-        need-xvfb: true
-    run-on-projects: [ 'trunk', 'try' ]
-
-linux64-stylo/debug:
-    description: "Linux64 Debug Stylo"
-    index:
-        product: firefox
-        job-name: linux64-stylo-debug
-    treeherder:
-        platform: linux64-stylo/debug
-        symbol: tc(B)
-        tier: 2
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 3600
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/releng.manifest"
-    run:
-        using: mozharness
-        actions: [get-secrets build check-test update]
-        config:
-            - builds/releng_base_linux_64_builds.py
-            - balrog/production.py
-        script: "mozharness/scripts/fx_desktop_build.py"
-        secrets: true
-        custom-build-variant-cfg: stylo-debug
-        tooltool-downloads: public
-        need-xvfb: true
-    run-on-projects: [ 'trunk', 'try' ]
-
 linux64-noopt/debug:
     description: "Linux64 No-optimize Debug"
     index:
         product: firefox
         job-name: linux64-noopt-debug
     treeherder:
         platform: linux64-noopt/debug
         symbol: tc(B)
--- a/taskcluster/ci/test/test-platforms.yml
+++ b/taskcluster/ci/test/test-platforms.yml
@@ -82,30 +82,30 @@ linux64-asan/opt:
     build-platform: linux64-asan/opt
     test-sets:
         - common-tests
         - headless
 
 # Stylo builds only run a subset of tests for the moment. So give them
 # their own test set.
 linux64-stylo/debug:
-    build-platform: linux64-stylo/debug
+    build-platform: linux64/debug
     test-sets:
         - stylo-tests
 linux64-stylo/opt:
-    build-platform: linux64-stylo/opt
+    build-platform: linux64/opt
     test-sets:
         - stylo-tests
         - talos
 linux64-stylo-sequential/debug:
-    build-platform: linux64-stylo/debug
+    build-platform: linux64/debug
     test-sets:
         - stylo-sequential-tests
 linux64-stylo-sequential/opt:
-    build-platform: linux64-stylo/opt
+    build-platform: linux64/opt
     test-sets:
         - stylo-sequential-tests
         - talos
 
 # QR builds just run a subset right now. Note that the tests in this
 # test set are further restricted in tests.yml to run on certain projects
 # only, to avoid adding too much infra load.
 linux64-qr/opt:
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -694,16 +694,33 @@ def set_test_type(config, tests):
     for test in tests:
         for test_type in ['mochitest', 'reftest']:
             if test_type in test['suite'] and 'web-platform' not in test['suite']:
                 test.setdefault('tags', {})['test-type'] = test_type
         yield test
 
 
 @transforms.add
+def enable_stylo(config, tests):
+    """
+    Force Stylo on for all its tests, except Stylo vs. Gecko reftests where the
+    test harness will handle this.
+    """
+    for test in tests:
+        if '-stylo' not in test['test-platform']:
+            yield test
+            continue
+
+        if 'reftest-stylo' not in test['suite']:
+            test['mozharness'].setdefault('extra-options', []).append('--enable-stylo')
+
+        yield test
+
+
+@transforms.add
 def parallel_stylo_tests(config, tests):
     """Ensure that any stylo tests running with e10s enabled also test
     parallel traversal in the style system."""
 
     for test in tests:
         if (not test['test-platform'].startswith('linux64-stylo/')) and \
            (not test['test-platform'].startswith('linux64-stylo-sequential/')):
             yield test
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -137,16 +137,22 @@ class Talos(TestingMixin, MercurialScrip
             "help": "Whether or not to profile the test run and save the profile results"
         }],
         [["--geckoProfileInterval"], {
             "dest": "gecko_profile_interval",
             "type": "int",
             "default": 0,
             "help": "The interval between samples taken by the profiler (milliseconds)"
         }],
+        [["--enable-stylo"], {
+            "action": "store_true",
+            "dest": "enable_stylo",
+            "default": False,
+            "help": "Run tests with stylo enabled"
+        }],
     ] + testing_config_options + copy.deepcopy(blobupload_config_options) \
                                + copy.deepcopy(code_coverage_config_options)
 
     def __init__(self, **kwargs):
         kwargs.setdefault('config_options', self.config_options)
         kwargs.setdefault('all_actions', ['clobber',
                                           'read-buildbot-config',
                                           'download-and-extract',
@@ -552,16 +558,19 @@ class Talos(TestingMixin, MercurialScrip
         # mitmproxy needs path to mozharness when installing the cert
         env['SCRIPTSPATH'] = scripts_path
 
         if self.repo_path is not None:
             env['MOZ_DEVELOPER_REPO_DIR'] = self.repo_path
         if self.obj_path is not None:
             env['MOZ_DEVELOPER_OBJ_DIR'] = self.obj_path
 
+        if self.config['enable_stylo'] or 'stylo' in self.buildbot_config['properties'].get('platform'):
+            env['STYLO_FORCE_ENABLED'] = '1'
+
         # sets a timeout for how long talos should run without output
         output_timeout = self.config.get('talos_output_timeout', 3600)
         # run talos tests
         run_tests = os.path.join(self.talos_path, 'talos', 'run_tests.py')
 
         mozlog_opts = ['--log-tbpl-level=debug']
         if not self.run_local and 'suite' in self.config:
             fname_pattern = '%s_%%s.log' % self.config['suite']
--- a/testing/mozharness/scripts/desktop_unittest.py
+++ b/testing/mozharness/scripts/desktop_unittest.py
@@ -145,16 +145,22 @@ class DesktopUnittest(TestingMixin, Merc
             "help": "Permits a software GL implementation (such as LLVMPipe) to use the GL compositor."}
          ],
         [["--parallel-stylo-traversal"], {
             "action": "store_true",
             "dest": "parallel_stylo_traversal",
             "default": False,
             "help": "Forcibly enable parallel traversal in Stylo with STYLO_THREADS=4"}
          ],
+        [["--enable-stylo"], {
+            "action": "store_true",
+            "dest": "enable_stylo",
+            "default": False,
+            "help": "Run tests with stylo enabled"}
+         ],
         [["--enable-webrender"], {
             "action": "store_true",
             "dest": "enable_webrender",
             "default": False,
             "help": "Tries to enable the WebRender compositor."}
          ],
     ] + copy.deepcopy(testing_config_options) + \
         copy.deepcopy(blobupload_config_options) + \
@@ -211,16 +217,19 @@ class DesktopUnittest(TestingMixin, Merc
                 perfherder_parts.extend(c[s])
 
         if 'this_chunk' in c:
             perfherder_parts.append(c['this_chunk'])
 
         if c['e10s']:
             perfherder_options.append('e10s')
 
+        if c['enable_stylo']:
+            perfherder_options.append('stylo')
+
         self.resource_monitor_perfherder_id = ('.'.join(perfherder_parts),
                                                perfherder_options)
 
     # helper methods {{{2
     def _pre_config_lock(self, rw_config):
         super(DesktopUnittest, self)._pre_config_lock(rw_config)
         c = self.config
         if not c.get('run_all_suites'):
@@ -704,16 +713,18 @@ class DesktopUnittest(TestingMixin, Merc
                     self.mkdir_p(env['MOZ_UPLOAD_DIR'])
 
                 if self.config['allow_software_gl_layers']:
                     env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
                 if self.config['enable_webrender']:
                     env['MOZ_WEBRENDER'] = '1'
 
                 env['STYLO_THREADS'] = '4' if self.config['parallel_stylo_traversal'] else '1'
+                if self.config['enable_stylo']:
+                    env['STYLO_FORCE_ENABLED'] = '1'
 
                 env = self.query_env(partial_env=env, log_level=INFO)
                 cmd_timeout = self.get_timeout_for_category(suite_category)
                 return_code = self.run_command(cmd, cwd=dirs['abs_work_dir'],
                                                output_timeout=cmd_timeout,
                                                output_parser=parser,
                                                env=env)
 
--- a/testing/mozharness/scripts/web_platform_tests.py
+++ b/testing/mozharness/scripts/web_platform_tests.py
@@ -63,16 +63,22 @@ class WebPlatformTest(TestingMixin, Merc
             "help": "Tries to enable the WebRender compositor."}
          ],
         [["--parallel-stylo-traversal"], {
             "action": "store_true",
             "dest": "parallel_stylo_traversal",
             "default": False,
             "help": "Forcibly enable parallel traversal in Stylo with STYLO_THREADS=4"}
          ],
+        [["--enable-stylo"], {
+            "action": "store_true",
+            "dest": "enable_stylo",
+            "default": False,
+            "help": "Run tests with stylo enabled"}
+         ],
     ] + copy.deepcopy(testing_config_options) + \
         copy.deepcopy(blobupload_config_options) + \
         copy.deepcopy(code_coverage_config_options)
 
     def __init__(self, require_config_file=True):
         super(WebPlatformTest, self).__init__(
             config_options=self.config_options,
             all_actions=[
@@ -249,16 +255,18 @@ class WebPlatformTest(TestingMixin, Merc
         env['RUST_BACKTRACE'] = '1'
 
         if self.config['allow_software_gl_layers']:
             env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
         if self.config['enable_webrender']:
             env['MOZ_WEBRENDER'] = '1'
 
         env['STYLO_THREADS'] = '4' if self.config['parallel_stylo_traversal'] else '1'
+        if self.config['enable_stylo']:
+            env['STYLO_FORCE_ENABLED'] = '1'
 
         env = self.query_env(partial_env=env, log_level=INFO)
 
         return_code = self.run_command(cmd,
                                        cwd=dirs['abs_work_dir'],
                                        output_timeout=1000,
                                        output_parser=parser,
                                        env=env)