Bug 1632614 [wpt PR 23213] - Python3: Add support for infrastructure/test PR triggered run, a=testonly
authorZiran Sun <zsun@igalia.com>
Wed, 13 May 2020 03:59:00 +0000
changeset 531028 92f742215955f5a0d80475e877c28b778d4052b3
parent 531027 542c6e7ff5812c2ba8c94d76552c59b82c7a44b1
child 531029 1b85f5c60a6eb8ee5ea294056847e84001feba87
push id37435
push userapavel@mozilla.com
push dateWed, 20 May 2020 15:28:23 +0000
treeherdermozilla-central@5415da14ec9a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1632614, 23213
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1632614 [wpt PR 23213] - Python3: Add support for infrastructure/test PR triggered run, a=testonly Automatic update from web-platform-tests Python3: Add support for infrastructure/test PR triggered run Due to the lack of HTTP/2.0 support in Python 3, this change also marks failed HTTP/2.0 related tests as expected. -- wpt-commits: 4e1a9fb3aa949f4cdb75898ca4f3b850f86434c7 wpt-pr: 23213
testing/web-platform/tests/infrastructure/metadata/infrastructure/server/http2-context.sub.h2.any.js.ini
testing/web-platform/tests/infrastructure/metadata/infrastructure/server/wpt-server-http.sub.html.ini
testing/web-platform/tests/tools/ci/ci_wptrunner_infrastructure.sh
testing/web-platform/tests/tools/ci/tc/tasks/test.yml
testing/web-platform/tests/tools/ci/tc/tests/test_valid.py
testing/web-platform/tests/tools/wptrunner/wptrunner/wpttest.py
--- a/testing/web-platform/tests/infrastructure/metadata/infrastructure/server/http2-context.sub.h2.any.js.ini
+++ b/testing/web-platform/tests/infrastructure/metadata/infrastructure/server/http2-context.sub.h2.any.js.ini
@@ -1,4 +1,17 @@
 [http2-context.sub.h2.any.sharedworker.html]
   bug: https://bugs.webkit.org/show_bug.cgi?id=149850
   expected:
-    if product == "safari" or product == "epiphany" or product == "webkit": ERROR
+    if product == "safari" or product == "epiphany" or product == "webkit" or python_version == 3: ERROR
+
+[http2-context.sub.h2.any.serviceworker.html]
+  expected:
+    if python_version == 3: ERROR
+
+[http2-context.sub.h2.any.html]
+  expected:
+    if python_version == 3: ERROR
+
+[http2-context.sub.h2.any.worker.html]
+  expected:
+    if python_version == 3: ERROR
+
--- a/testing/web-platform/tests/infrastructure/metadata/infrastructure/server/wpt-server-http.sub.html.ini
+++ b/testing/web-platform/tests/infrastructure/metadata/infrastructure/server/wpt-server-http.sub.html.ini
@@ -13,8 +13,33 @@
 
   [HTTPS protocol, www subdomain #3]
     expected:
       if product == "epiphany" or product == "webkit": FAIL
 
   [HTTPS protocol, punycode subdomain #2]
     expected:
       if product == "epiphany" or product == "webkit": FAIL
+
+  [H2 protocol, no subdomain]
+    expected:
+      if python_version == 3: FAIL
+
+  [H2 protocol, www subdomain #1]
+    expected:
+      if python_version == 3: FAIL
+
+  [H2 protocol, www subdomain #2]
+    expected:
+      if python_version == 3: FAIL
+
+  [H2 protocol, www subdomain #3]
+    expected:
+      if python_version == 3: FAIL
+
+  [H2 protocol, punycode subdomain #1]
+    expected:
+      if python_version == 3: FAIL
+
+  [H2 protocol, punycode subdomain #2]
+    expected:
+      if python_version == 3: FAIL
+
--- a/testing/web-platform/tests/tools/ci/ci_wptrunner_infrastructure.sh
+++ b/testing/web-platform/tests/tools/ci/ci_wptrunner_infrastructure.sh
@@ -1,24 +1,29 @@
 #!/bin/bash
 set -ex
 
 SCRIPT_DIR=$(cd $(dirname "$0") && pwd -P)
 WPT_ROOT=$SCRIPT_DIR/../..
 cd $WPT_ROOT
 
 test_infrastructure() {
-    TERM=dumb ./wpt run --log-mach - --yes --manifest ~/meta/MANIFEST.json --metadata infrastructure/metadata/ --install-fonts $1 $PRODUCT infrastructure/
+    PY3_FLAG="$2"
+    TERM=dumb ./wpt $PY3_FLAG run --log-mach - --yes --manifest ~/meta/MANIFEST.json --metadata infrastructure/metadata/ --install-fonts $1 $PRODUCT infrastructure/
 }
 
 main() {
-    PRODUCTS=( "firefox" "chrome" )
+    if [[ $# -eq 1 && "$1" = "--py3" ]]; then
+        PRODUCTS=( "chrome" )
+    else
+        PRODUCTS=( "firefox" "chrome" )
+    fi
     ./wpt manifest --rebuild -p ~/meta/MANIFEST.json
     for PRODUCT in "${PRODUCTS[@]}"; do
         if [[ "$PRODUCT" == "chrome" ]]; then
-            test_infrastructure "--binary=$(which google-chrome-unstable) --channel dev"
+            test_infrastructure "--binary=$(which google-chrome-unstable) --channel dev" "$1"
         else
             test_infrastructure "--binary=~/build/firefox/firefox"
         fi
     done
 }
 
-main
+main $1
--- a/testing/web-platform/tests/tools/ci/tc/tasks/test.yml
+++ b/testing/web-platform/tests/tools/ci/tc/tasks/test.yml
@@ -449,8 +449,33 @@ tasks:
           - firefox
           - chrome
         channel: experimental
         xvfb: true
         hosts: false
       schedule-if:
         run-job:
           - wptrunner_infrastructure
+
+  - infrastructure/ tests (Python 3):
+      description: >-
+        Smoketests for wptrunner
+      vars:
+        channel: nightly
+      use:
+        - wpt-base
+        - trigger-pr
+      command: ./tools/ci/ci_wptrunner_infrastructure.sh --py3
+      install:
+        - python3-pip
+        - libnss3-tools
+        - libappindicator1
+        - fonts-liberation
+      options:
+        oom-killer: true
+        browser:
+          - chrome
+        channel: experimental
+        xvfb: true
+        hosts: false
+      schedule-if:
+        run-job:
+          - wptrunner_infrastructure
--- a/testing/web-platform/tests/tools/ci/tc/tests/test_valid.py
+++ b/testing/web-platform/tests/tools/ci/tc/tests/test_valid.py
@@ -127,17 +127,18 @@ def test_verify_payload():
       'lint',
       'tools/ unittests (Python 2)',
       'tools/ unittests (Python 3.6)',
       'tools/ unittests (Python 3.8)',
       'tools/wpt/ tests (Python 2)',
       'tools/wpt/ tests (Python 3.6)',
       'tools/wpt/ tests (Python 3.8)',
       'resources/ tests',
-      'infrastructure/ tests'}),
+      'infrastructure/ tests',
+      'infrastructure/ tests (Python 3)'}),
     # More tests are affected in the actual PR but it shouldn't affect the scheduled tasks
     ("pr_event_tests_affected.json", True, {"layout-instability/clip-negative-bottom-margin.html",
                                             "layout-instability/composited-element-movement.html"},
      {'download-firefox-nightly',
       'wpt-firefox-nightly-stability',
       'wpt-firefox-nightly-results',
       'wpt-firefox-nightly-results-without-changes',
       'wpt-chrome-dev-stability',
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/wpttest.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/wpttest.py
@@ -1,10 +1,11 @@
 import os
 import subprocess
+import sys
 from six.moves.urllib.parse import urljoin
 from collections import defaultdict
 from six import iteritems, string_types
 
 from .wptmanifest.parser import atoms
 
 atom_reset = atoms["Reset"]
 enabled_tests = {"testharness", "reftest", "wdspec", "crashtest"}
@@ -97,16 +98,17 @@ class RunInfo(dict):
         try:
             # GitTree.__init__ throws if we are not in a git tree.
             rev = GitTree(log_error=False).rev
         except (OSError, subprocess.CalledProcessError):
             rev = None
         if rev:
             self["revision"] = rev
 
+        self["python_version"] = sys.version_info.major
         self["product"] = product
         if debug is not None:
             self["debug"] = debug
         elif "debug" not in self:
             # Default to release
             self["debug"] = False
         if browser_version:
             self["browser_version"] = browser_version