Update web-platform-tests to revision 1aaada4bbc936024441fe7995b77c21a2c554da1

This commit is contained in:
WPT Sync Bot 2018-09-16 21:28:15 -04:00
parent 1e1eca07ed
commit 5e9d150c07
140 changed files with 3413 additions and 553 deletions

View file

@ -35,11 +35,21 @@ job_path_map = {
}
def _path_norm(path):
"""normalize a path for both case and slashes (to /)"""
path = os.path.normcase(path)
if os.path.sep != "/":
# this must be after the normcase call as that does slash normalization
path = path.replace(os.path.sep, "/")
return path
class Ruleset(object):
def __init__(self, rules):
self.include = []
self.exclude = []
for rule in rules:
rule = _path_norm(rule)
self.add_rule(rule)
def add_rule(self, rule):
@ -52,9 +62,7 @@ class Ruleset(object):
target.append(re.compile("^%s" % rule))
def __call__(self, path):
if os.path.sep != "/":
path = path.replace(os.path.sep, "/")
path = os.path.normcase(path)
path = _path_norm(path)
for item in self.exclude:
if item.match(path):
return False

View file

@ -1,14 +1,8 @@
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"],
@ -19,8 +13,6 @@ 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"])
@ -51,8 +43,6 @@ 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"])
@ -62,8 +52,6 @@ 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"])
@ -71,8 +59,6 @@ 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"])
@ -82,8 +68,6 @@ 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"])
@ -93,16 +77,12 @@ 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"])

View file

@ -19,7 +19,6 @@ from collections import defaultdict, OrderedDict
from multiprocessing import Process, Event
from localpaths import repo_root
from six.moves import reload_module
from manifest.sourcefile import read_script_metadata, js_meta_re, parse_variants
from wptserve import server as wptserve, handlers
@ -630,9 +629,12 @@ class WebSocketDaemon(object):
def start_ws_server(host, port, paths, routes, bind_address, config, **kwargs):
# Ensure that when we start this in a new process we don't inherit the
# global lock in the logging module
reload_module(logging)
# Ensure that when we start this in a new process we have the global lock
# in the logging module unlocked
try:
logging._releaseLock()
except RuntimeError:
pass
return WebSocketDaemon(host,
str(port),
repo_root,
@ -643,9 +645,12 @@ def start_ws_server(host, port, paths, routes, bind_address, config, **kwargs):
def start_wss_server(host, port, paths, routes, bind_address, config, **kwargs):
# Ensure that when we start this in a new process we don't inherit the
# global lock in the logging module
reload_module(logging)
# Ensure that when we start this in a new process we have the global lock
# in the logging module unlocked
try:
logging._releaseLock()
except RuntimeError:
pass
return WebSocketDaemon(host,
str(port),
repo_root,

View file

@ -230,10 +230,10 @@ class BrowserManager(object):
self.init_timer.cancel()
def check_for_crashes(self):
self.browser.check_for_crashes()
return self.browser.check_for_crashes()
def log_crash(self, test_id):
self.browser.log_crash(process=self.browser_pid, test=test_id)
return self.browser.log_crash(process=self.browser_pid, test=test_id)
def is_alive(self):
return self.browser.is_alive()
@ -570,9 +570,8 @@ class TestRunnerManager(threading.Thread):
expected = test.expected()
status = status_subns.get(file_result.status, file_result.status)
if file_result.status in ("TIMEOUT", "EXTERNAL-TIMEOUT", "INTERNAL-ERROR"):
if self.browser.check_for_crashes():
status = "CRASH"
if self.browser.check_for_crashes():
status = "CRASH"
self.test_count += 1
is_unexpected = expected != status