diff --git a/taskcluster/taskgraph/transforms/tests.py b/taskcluster/taskgraph/transforms/tests.py index b7d9aad24944..fcbc48950bd8 100644 --- a/taskcluster/taskgraph/transforms/tests.py +++ b/taskcluster/taskgraph/transforms/tests.py @@ -133,6 +133,9 @@ test_description_schema = Schema({ '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', @@ -333,6 +336,15 @@ def set_defaults(config, tests): 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') @@ -588,6 +600,20 @@ def allow_software_gl_layers(config, tests): 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