From 120bb04de2285ad1f94b323aa390668d19199cba Mon Sep 17 00:00:00 2001 From: Bob Clary Date: Wed, 21 Feb 2018 05:52:04 -0800 Subject: [PATCH] Bug 1437215 - Measure WebRender memory usage on Linux x86_64 using AWSY tests, r=jmaher --- taskcluster/ci/test/test-platforms.yml | 1 + testing/awsy/mach_commands.py | 7 +++++++ testing/mozharness/scripts/awsy_script.py | 10 ++++++++++ 3 files changed, 18 insertions(+) diff --git a/taskcluster/ci/test/test-platforms.yml b/taskcluster/ci/test/test-platforms.yml index 93c8fe9a8b13..ab42929df44d 100644 --- a/taskcluster/ci/test/test-platforms.yml +++ b/taskcluster/ci/test/test-platforms.yml @@ -118,6 +118,7 @@ linux64-qr/opt: test-sets: - linux-qr-tests - linux-qr-talos + - awsy linux64-qr/debug: build-platform: linux64/debug test-sets: diff --git a/testing/awsy/mach_commands.py b/testing/awsy/mach_commands.py index 503cd3e6d366..2d552f8edb3b 100644 --- a/testing/awsy/mach_commands.py +++ b/testing/awsy/mach_commands.py @@ -82,6 +82,10 @@ class MachCommands(MachCommandBase): if 'disable_stylo' in kwargs and kwargs['disable_stylo']: os.environ['STYLO_FORCE_DISABLED'] = '1' + if 'enable_webrender' in kwargs and kwargs['enable_webrender']: + os.environ['MOZ_WEBRENDER'] = '1' + os.environ['MOZ_ACCELERATED'] = '1' + runtime_testvars = {} for arg in ('webRootDir', 'pageManifest', 'resultsDir', 'entities', 'iterations', 'perTabPause', 'settleWaitTime', 'maxTabs', 'dmd'): @@ -220,6 +224,9 @@ class MachCommands(MachCommandBase): @CommandArgument('--single-stylo-traversal', group='AWSY', action='store_true', dest='single_stylo_traversal', default=False, help='Set STYLO_THREADS=1.') + @CommandArgument('--enable-webrender', group='AWSY', action='store_true', + dest='enable_webrender', default=False, + help='Enable WebRender.') @CommandArgument('--dmd', group='AWSY', action='store_true', dest='dmd', default=False, help='Enable DMD during testing. Requires a DMD-enabled build.') diff --git a/testing/mozharness/scripts/awsy_script.py b/testing/mozharness/scripts/awsy_script.py index e396de61bf8e..f63c87889b08 100644 --- a/testing/mozharness/scripts/awsy_script.py +++ b/testing/mozharness/scripts/awsy_script.py @@ -43,6 +43,12 @@ class AWSY(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin, CodeCo "dest": "single_stylo_traversal", "default": False, "help": "Set STYLO_THREADS=1.", + }], + [["--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) @@ -171,6 +177,10 @@ class AWSY(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin, CodeCo # TODO: consider getting rid of this as stylo is enabled by default env['STYLO_FORCE_ENABLED'] = '1' + if self.config['enable_webrender']: + env['MOZ_WEBRENDER'] = '1' + env['MOZ_ACCELERATED'] = '1' + env['MOZ_UPLOAD_DIR'] = dirs['abs_blob_upload_dir'] if not os.path.isdir(env['MOZ_UPLOAD_DIR']): self.mkdir_p(env['MOZ_UPLOAD_DIR'])