Bug 1342488 - Add a flag in the task to run with webrender, and enable it by default on linux64-qr test platforms. r?dustin draft
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 12 May 2017 15:28:17 -0400
changeset 577070 f413bdade3539c164e3f02ea18c0e56ebf1299bf
parent 577069 b4e4a47a95998348b4b499e0aa4ede3ef9159b28
child 577071 7177bb6a19e1e544fb57bc71b512c6062a12965c
push id58591
push userkgupta@mozilla.com
push dateFri, 12 May 2017 19:28:39 +0000
reviewersdustin
bugs1342488
milestone55.0a1
Bug 1342488 - Add a flag in the task to run with webrender, and enable it by default on linux64-qr test platforms. r?dustin MozReview-Commit-ID: 2gXeniJT1Cf
taskcluster/taskgraph/transforms/tests.py
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -128,16 +128,19 @@ test_description_schema = Schema({
     # Whether to run this task with e10s (desktop-test only).  If false, run
     # without e10s; if true, run with e10s; if 'both', run one task with and
     # one task without e10s.  E10s tasks have "-e10s" appended to the test name
     # and treeherder group.
     Required('e10s', default='both'): optionally_keyed_by(
         'test-platform', 'project',
         Any(bool, 'both')),
 
+    # Whether the task should run with WebRender enabled or not.
+    Optional('webrender', default=False): bool,
+
     # The EC2 instance size to run these tests on.
     Required('instance-size', default='default'): optionally_keyed_by(
         'test-platform',
         Any('default', 'large', 'xlarge', 'legacy')),
 
     # Whether the task requires loopback audio or video (whatever that may mean
     # on the platform)
     Required('loopback-audio', default=False): bool,
@@ -328,16 +331,25 @@ def set_defaults(config, tests):
             test.setdefault('e10s', 'both')
 
         # software-gl-layers is only meaningful on linux, where it defaults to True
         if test['test-platform'].startswith('linux'):
             test.setdefault('allow-software-gl-layers', True)
         else:
             test['allow-software-gl-layers'] = False
 
+        # Enable WebRender by default on the QuantumRender test platform, since
+        # the whole point of QuantumRender is to run with WebRender enabled.
+        # If other *-qr test platforms are added they should also be checked for
+        # here; currently linux64-qr is the only one.
+        if test['test-platform'].startswith('linux64-qr'):
+            test['webrender'] = True
+        else:
+            test.setdefault('webrender', False)
+
         test.setdefault('os-groups', [])
         test.setdefault('chunks', 1)
         test.setdefault('run-on-projects', 'built-projects')
         test.setdefault('instance-size', 'default')
         test.setdefault('max-run-time', 3600)
         test.setdefault('reboot', True)
         test['mozharness'].setdefault('extra-options', [])
         yield test
@@ -584,16 +596,30 @@ def allow_software_gl_layers(config, tes
             # This should be set always once bug 1296086 is resolved.
             test['mozharness'].setdefault('extra-options', [])\
                               .append("--allow-software-gl-layers")
 
         yield test
 
 
 @transforms.add
+def enable_webrender(config, tests):
+    """
+    Handle the "webrender" property by passing a flag to mozharness if it is
+    enabled.
+    """
+    for test in tests:
+        if test.get('webrender'):
+            test['mozharness'].setdefault('extra-options', [])\
+                              .append("--enable-webrender")
+
+        yield test
+
+
+@transforms.add
 def set_retry_exit_status(config, tests):
     """Set the retry exit status to TBPL_RETRY, the value returned by mozharness
        scripts to indicate a transient failure that should be retried."""
     for test in tests:
         test['retry-exit-status'] = 4
         yield test