mirror of
https://github.com/servo/servo.git
synced 2025-08-21 21:35:32 +01:00
Update web-platform-tests to revision 632a3f59238036b6e24b28d47218ba9986ff4c62
This commit is contained in:
parent
cd02ca6c19
commit
fb838278a5
430 changed files with 15017 additions and 508 deletions
|
@ -1,12 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
# This is allowed to fail
|
||||
./wpt manifest-download || echo
|
||||
|
||||
if [ $1 == "firefox" ]; then
|
||||
./wpt run firefox --log-tbpl=../artifacts/log_tbpl.log --log-tbpl-level=info --log-wptreport=../artifacts/wpt_report.json --log-mach=- --this-chunk=$4 --total-chunks=$5 --test-type=$3 -y --install-browser --channel=$2 --no-pause --no-restart-on-unexpected --reftest-internal --install-fonts --no-fail-on-unexpected
|
||||
elif [ $1 == "chrome" ]; then
|
||||
./wpt run chrome --log-tbpl=../artifacts/log_tbpl.log --log-tbpl-level=info --log-wptreport=../artifacts/wpt_report.json --log-mach=- --channel=$2 --this-chunk=$4 --total-chunks=$5 --test-type=$3 -y --no-pause --no-restart-on-unexpected --install-fonts --no-fail-on-unexpected
|
||||
fi
|
||||
gzip ../artifacts/wpt_report.json
|
101
tests/wpt/web-platform-tests/tools/ci/taskcluster-run.py
Executable file
101
tests/wpt/web-platform-tests/tools/ci/taskcluster-run.py
Executable file
|
@ -0,0 +1,101 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import gzip
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
browser_specific_args = {
|
||||
"firefox": ["--install-browser"]
|
||||
}
|
||||
|
||||
def tests_affected(commit_range):
|
||||
output = subprocess.check_output([
|
||||
"python", "./wpt", "tests-affected", "--null", commit_range
|
||||
], stderr=open(os.devnull, "w"))
|
||||
|
||||
tests = output.split("\0")
|
||||
|
||||
# Account for trailing null byte
|
||||
if tests and not tests[-1]:
|
||||
tests.pop()
|
||||
|
||||
return tests
|
||||
|
||||
|
||||
def find_wptreport(args):
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--log-wptreport', action='store')
|
||||
return parser.parse_known_args(args)[0].log_wptreport
|
||||
|
||||
|
||||
def gzip_file(filename):
|
||||
with open(filename, 'rb') as f_in:
|
||||
with gzip.open('%s.gz' % filename, 'wb') as f_out:
|
||||
shutil.copyfileobj(f_in, f_out)
|
||||
|
||||
|
||||
def main(product, commit_range, wpt_args):
|
||||
"""Invoke the `wpt run` command according to the needs of the TaskCluster
|
||||
continuous integration service."""
|
||||
|
||||
logger = logging.getLogger("tc-run")
|
||||
logger.setLevel(logging.INFO)
|
||||
handler = logging.StreamHandler()
|
||||
handler.setFormatter(
|
||||
logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||
)
|
||||
logger.addHandler(handler)
|
||||
|
||||
child = subprocess.Popen(['python', './wpt', 'manifest-download'])
|
||||
child.wait()
|
||||
|
||||
if commit_range:
|
||||
logger.info(
|
||||
"Identifying tests affected in range '%s'..." % commit_range
|
||||
)
|
||||
tests = tests_affected(commit_range)
|
||||
logger.info("Identified %s affected tests" % len(tests))
|
||||
|
||||
if not tests:
|
||||
logger.info("Quitting because no tests were affected.")
|
||||
return
|
||||
else:
|
||||
tests = []
|
||||
logger.info("Running all tests")
|
||||
|
||||
wpt_args += [
|
||||
"--log-tbpl=../artifacts/log_tbpl.log",
|
||||
"--log-tbpl-level=info",
|
||||
"--log-mach=-",
|
||||
"-y",
|
||||
"--no-pause",
|
||||
"--no-restart-on-unexpected",
|
||||
"--install-fonts"
|
||||
]
|
||||
wpt_args += browser_specific_args.get(product, [])
|
||||
|
||||
command = ["python", "./wpt", "run"] + wpt_args + [product] + tests
|
||||
|
||||
logger.info("Executing command: %s" % " ".join(command))
|
||||
|
||||
subprocess.check_call(command)
|
||||
|
||||
wptreport = find_wptreport(wpt_args)
|
||||
if wptreport:
|
||||
gzip_file(wptreport)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description=main.__doc__)
|
||||
parser.add_argument("--commit-range", action="store",
|
||||
help="""Git commit range. If specified, this will be
|
||||
supplied to the `wpt tests-affected` command to
|
||||
determine the list of test to execute""")
|
||||
parser.add_argument("product", action="store",
|
||||
help="Browser to run tests in")
|
||||
parser.add_argument("wpt_args", nargs="*",
|
||||
help="Arguments to forward to `wpt run` command")
|
||||
main(**vars(parser.parse_args()))
|
|
@ -1,8 +1,14 @@
|
|||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from tools.ci import jobs
|
||||
|
||||
default_jobs = set(["lint", "manifest_upload"])
|
||||
|
||||
|
||||
@pytest.mark.xfail(sys.platform == "win32",
|
||||
reason="https://github.com/web-platform-tests/wpt/issues/12949")
|
||||
def test_testharness():
|
||||
assert jobs.get_jobs(["resources/testharness.js"]) == default_jobs | set(["resources_unittest"])
|
||||
assert jobs.get_jobs(["resources/testharness.js"],
|
||||
|
@ -13,6 +19,8 @@ def test_testharness():
|
|||
includes=["resources_unittest"]) == set()
|
||||
|
||||
|
||||
@pytest.mark.xfail(sys.platform == "win32",
|
||||
reason="https://github.com/web-platform-tests/wpt/issues/12949")
|
||||
def test_stability():
|
||||
assert jobs.get_jobs(["dom/historical.html"],
|
||||
includes=["stability"]) == set(["stability"])
|
||||
|
@ -43,6 +51,8 @@ def test_default():
|
|||
assert jobs.get_jobs(["README.md"]) == default_jobs
|
||||
|
||||
|
||||
@pytest.mark.xfail(sys.platform == "win32",
|
||||
reason="https://github.com/web-platform-tests/wpt/issues/12949")
|
||||
def test_tools_unittest():
|
||||
assert jobs.get_jobs(["tools/ci/test/test_jobs.py"],
|
||||
includes=["tools_unittest"]) == set(["tools_unittest"])
|
||||
|
@ -52,6 +62,8 @@ def test_tools_unittest():
|
|||
includes=["tools_unittest"]) == set()
|
||||
|
||||
|
||||
@pytest.mark.xfail(sys.platform == "win32",
|
||||
reason="https://github.com/web-platform-tests/wpt/issues/12949")
|
||||
def test_wptrunner_unittest():
|
||||
assert jobs.get_jobs(["tools/wptrunner/wptrunner/wptrunner.py"],
|
||||
includes=["wptrunner_unittest"]) == set(["wptrunner_unittest"])
|
||||
|
@ -59,6 +71,8 @@ def test_wptrunner_unittest():
|
|||
includes=["wptrunner_unittest"]) == set()
|
||||
|
||||
|
||||
@pytest.mark.xfail(sys.platform == "win32",
|
||||
reason="https://github.com/web-platform-tests/wpt/issues/12949")
|
||||
def test_build_css():
|
||||
assert jobs.get_jobs(["css/css-build-testsuites.sh"],
|
||||
includes=["build_css"]) == set(["build_css"])
|
||||
|
@ -68,6 +82,8 @@ def test_build_css():
|
|||
includes=["build_css"]) == set()
|
||||
|
||||
|
||||
@pytest.mark.xfail(sys.platform == "win32",
|
||||
reason="https://github.com/web-platform-tests/wpt/issues/12949")
|
||||
def test_update_built():
|
||||
assert jobs.get_jobs(["2dcontext/foo.html"],
|
||||
includes=["update_built"]) == set(["update_built"])
|
||||
|
@ -77,12 +93,16 @@ def test_update_built():
|
|||
includes=["update_built"]) == set(["update_built"])
|
||||
|
||||
|
||||
@pytest.mark.xfail(sys.platform == "win32",
|
||||
reason="https://github.com/web-platform-tests/wpt/issues/12949")
|
||||
def test_wpt_integration():
|
||||
assert jobs.get_jobs(["tools/wpt/wpt.py"],
|
||||
includes=["wpt_integration"]) == set(["wpt_integration"])
|
||||
assert jobs.get_jobs(["tools/wptrunner/wptrunner/wptrunner.py"],
|
||||
includes=["wpt_integration"]) == set(["wpt_integration"])
|
||||
|
||||
@pytest.mark.xfail(sys.platform == "win32",
|
||||
reason="https://github.com/web-platform-tests/wpt/issues/12949")
|
||||
def test_wpt_infrastructure():
|
||||
assert jobs.get_jobs(["tools/hammer.html"],
|
||||
includes=["wptrunner_infrastructure"]) == set(["wptrunner_infrastructure"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue