Bug 1373739 - Set up Taskcluster/Mozharness to run WPT headless tests on Windows; r?bdahl draft
authorMichael Smith <michael@spinda.net>
Tue, 11 Jul 2017 13:55:02 -0700
changeset 607113 bc50d0007cc94d5797db0cd70b96f0997a2a24d0
parent 607112 7a1b6f7a9676da0060f7020ed01e78dd5b18bb08
child 607114 9a3662f29cc1091c748d9a7a625d044fc02d4103
push id67892
push userbmo:lists@spinda.net
push dateTue, 11 Jul 2017 21:07:34 +0000
reviewersbdahl
bugs1373739
milestone56.0a1
Bug 1373739 - Set up Taskcluster/Mozharness to run WPT headless tests on Windows; r?bdahl The screen resolution 1024x768 comes from what I've determined to be the resolution that Windows VMs run with in our testing infrastructure. Setting a different screen resolution causes web platform tests to unexpectedly pass (in particular, several in open-features-non-integer-height.html). MozReview-Commit-ID: I5HFKtJzzHS
taskcluster/ci/test/tests.yml
testing/mozharness/scripts/web_platform_tests.py
--- a/taskcluster/ci/test/tests.yml
+++ b/taskcluster/ci/test/tests.yml
@@ -1539,16 +1539,21 @@ web-platform-tests-headless:
                     by-test-platform:
                         windows.*:
                             - web_platform_tests/prod_config_windows_taskcluster.py
                         default:
                             - web_platform_tests/prod_config.py
                             - remove_executables.py
                 extra-options:
                     by-test-platform:
+                        windows.*:
+                            - --test-type=testharness
+                            - --headless
+                            - --headless-width=1024
+                            - --headless-height=768
                         default:
                             - --test-type=testharness
                             - --headless
     tier:
         by-test-platform:
             default: default
 
 web-platform-tests-reftests:
--- a/testing/mozharness/scripts/web_platform_tests.py
+++ b/testing/mozharness/scripts/web_platform_tests.py
@@ -63,16 +63,28 @@ class WebPlatformTest(TestingMixin, Merc
             "help": "Tries to enable the WebRender compositor."}
          ],
         [["--headless"], {
             "action": "store_true",
             "dest": "headless",
             "default": False,
             "help": "Run tests in headless mode."}
          ],
+        [["--headless-width"], {
+            "action": "store",
+            "dest": "headless_width",
+            "default": "1600",
+            "help": "Specify headless fake screen width (default: 1600)."}
+         ],
+        [["--headless-height"], {
+            "action": "store",
+            "dest": "headless_height",
+            "default": "1200",
+            "help": "Specify headless fake screen height (default: 1200)."}
+         ],
         [["--parallel-stylo-traversal"], {
             "action": "store_true",
             "dest": "parallel_stylo_traversal",
             "default": False,
             "help": "Forcibly enable parallel traversal in Stylo with STYLO_THREADS=4"}
          ],
     ] + copy.deepcopy(testing_config_options) + \
         copy.deepcopy(blobupload_config_options) + \
@@ -255,18 +267,18 @@ class WebPlatformTest(TestingMixin, Merc
         env['RUST_BACKTRACE'] = '1'
 
         if self.config['allow_software_gl_layers']:
             env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
         if self.config['enable_webrender']:
             env['MOZ_WEBRENDER'] = '1'
         if self.config['headless']:
             env['MOZ_HEADLESS'] = '1'
-            env['MOZ_HEADLESS_WIDTH'] = '1600'
-            env['MOZ_HEADLESS_HEIGHT'] = '1200'
+            env['MOZ_HEADLESS_WIDTH'] = self.config['headless_width']
+            env['MOZ_HEADLESS_HEIGHT'] = self.config['headless_height']
 
         env['STYLO_THREADS'] = '4' if self.config['parallel_stylo_traversal'] else '1'
 
         env = self.query_env(partial_env=env, log_level=INFO)
 
         return_code = self.run_command(cmd,
                                        cwd=dirs['abs_work_dir'],
                                        output_timeout=1000,