Bug 1383149 - Add option to run talos tests with webrender enabled. r?ahal draft
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 14 Aug 2017 16:51:25 -0400
changeset 646101 d4db1295a2ddfbc85e471cdf728afd750168d584
parent 645963 6213fec03a47275d8fcbf79b951547e3993d677f
child 646102 b7e338a9299372b9a31a31159555b8cf6bc7429f
push id74006
push userkgupta@mozilla.com
push dateMon, 14 Aug 2017 21:31:20 +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')