Bug 1383149 - Add option to run talos tests with webrender enabled. r=ahal
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 14 Aug 2017 16:51:25 -0400
changeset 647041 e39c1c950b794ba9dc7a5180d0d7ff9fffb6a23c
parent 647040 34713ce869a6dddbba05f6014247fd7ada2c0b86
child 647042 55b4847d7a2bdf1afa354d49b66d7b5064aec448
push id74288
push userhikezoe@mozilla.com
push dateWed, 16 Aug 2017 00:19:57 +0000
reviewersahal
bugs1383149
milestone57.0a1
Bug 1383149 - Add option to run talos tests with webrender enabled. r=ahal MozReview-Commit-ID: 7pS6DtLtWM0
testing/mozharness/mozharness/mozilla/testing/talos.py
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -143,16 +143,22 @@ class Talos(TestingMixin, MercurialScrip
             "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"
         }],
+        [["--enable-webrender"], {
+            "action": "store_true",
+            "dest": "enable_webrender",
+            "default": False,
+            "help": "Tries to enable the WebRender compositor.",
+        }],
     ] + 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',
@@ -558,21 +564,29 @@ 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_webrender']:
+            env['MOZ_WEBRENDER'] = '1'
+            env['MOZ_ACCELERATED'] = '1'
+
         if self.config['enable_stylo']:
             env['STYLO_FORCE_ENABLED'] = '1'
+
         # Remove once Talos is migrated away from buildbot
         if self.buildbot_config:
             platform = self.buildbot_config.get('properties', {}).get('platform', '')
+            if 'qr' in platform:
+                env['MOZ_WEBRENDER'] = '1'
+                env['MOZ_ACCELERATED'] = '1'
             if 'stylo' in 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')