mirror of
https://github.com/servo/servo.git
synced 2025-08-18 11:55:39 +01:00
Update web-platform-tests to revision 3ec34e5a2c8cbeeb7fad521cce0daf923b272a92
This commit is contained in:
parent
e9fdcdc785
commit
d67bfb7ff8
58 changed files with 2014 additions and 848 deletions
|
@ -122,10 +122,8 @@ def env_options():
|
|||
# domains to localhost without relying on the network stack.
|
||||
#
|
||||
# https://github.com/w3c/web-platform-tests/pull/9480
|
||||
return {"host_ip": "127.0.0.1",
|
||||
"host": "web-platform.test",
|
||||
return {"server_host": "127.0.0.1",
|
||||
"bind_address": False,
|
||||
"certificate_domain": "web-platform.test",
|
||||
"supports_debugger": True}
|
||||
|
||||
|
||||
|
|
|
@ -52,8 +52,7 @@ def env_extras(**kwargs):
|
|||
|
||||
|
||||
def env_options():
|
||||
return {"host": "web-platform.test",
|
||||
"host_ip": "127.0.0.1",
|
||||
return {"server_host": "127.0.0.1",
|
||||
"bind_address": False,
|
||||
"testharnessreport": "testharnessreport-servo.js",
|
||||
"supports_debugger": True}
|
||||
|
|
|
@ -53,8 +53,7 @@ def env_extras(**kwargs):
|
|||
|
||||
|
||||
def env_options():
|
||||
return {"host_ip": "127.0.0.1",
|
||||
"host": "web-platform.test",
|
||||
return {"server_host": "127.0.0.1",
|
||||
"testharnessreport": "testharnessreport-servodriver.js",
|
||||
"supports_debugger": True}
|
||||
|
||||
|
|
|
@ -147,8 +147,8 @@ class TestEnvironment(object):
|
|||
"ssl": {}
|
||||
}
|
||||
|
||||
if "host" in self.options:
|
||||
local_config["host"] = self.options["host"]
|
||||
if "browser_host" in self.options:
|
||||
local_config["browser_host"] = self.options["browser_host"]
|
||||
|
||||
if "bind_address" in self.options:
|
||||
local_config["bind_address"] = self.options["bind_address"]
|
||||
|
@ -156,7 +156,7 @@ class TestEnvironment(object):
|
|||
with open(default_config_path) as f:
|
||||
default_config = json.load(f)
|
||||
|
||||
local_config["host_ip"] = self.options.get("host_ip", None)
|
||||
local_config["server_host"] = self.options.get("server_host", None)
|
||||
local_config["ssl"]["encrypt_after_connect"] = self.options.get("encrypt_after_connect", False)
|
||||
|
||||
config = serve.merge_json(default_config, local_config)
|
||||
|
@ -165,7 +165,7 @@ class TestEnvironment(object):
|
|||
if not self.ssl_env.ssl_enabled:
|
||||
config["ports"]["https"] = [None]
|
||||
|
||||
host = self.options.get("certificate_domain", config["host"])
|
||||
host = config["browser_host"]
|
||||
hosts = [host]
|
||||
hosts.extend("%s.%s" % (item[0], host) for item in serve.get_subdomains(host).values())
|
||||
key_file, certificate = self.ssl_env.host_cert_path(hosts)
|
||||
|
@ -240,7 +240,7 @@ class TestEnvironment(object):
|
|||
|
||||
def test_servers(self):
|
||||
failed = []
|
||||
host = self.config.get("host_ip") or self.config.get("host")
|
||||
host = self.config["server_host"]
|
||||
for scheme, servers in self.servers.iteritems():
|
||||
for port, server in servers:
|
||||
if self.test_server_port:
|
||||
|
|
|
@ -172,7 +172,7 @@ class TestExecutor(object):
|
|||
|
||||
def server_url(self, protocol):
|
||||
return "%s://%s:%s" % (protocol,
|
||||
self.server_config["host"],
|
||||
self.server_config["browser_host"],
|
||||
self.server_config["ports"][protocol][0])
|
||||
|
||||
def test_url(self, test):
|
||||
|
|
|
@ -58,6 +58,8 @@ def test_server_start_config(product):
|
|||
start.assert_called_once()
|
||||
args = start.call_args
|
||||
config = args[0][0]
|
||||
if "host" in env_options:
|
||||
assert config["host"] == env_options["host"]
|
||||
if "server_host" in env_options:
|
||||
assert config["server_host"] == env_options["server_host"]
|
||||
else:
|
||||
assert config["server_host"] == config["browser_host"]
|
||||
assert isinstance(config["bind_address"], bool)
|
||||
|
|
|
@ -4,6 +4,7 @@ import os
|
|||
import sys
|
||||
from collections import OrderedDict
|
||||
from distutils.spawn import find_executable
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
import config
|
||||
import wpttest
|
||||
|
@ -82,6 +83,36 @@ scheme host and port.""")
|
|||
mode_group.add_argument("--verify-log-full", action="store_true",
|
||||
default=False,
|
||||
help="Output per-iteration test results when running verify")
|
||||
mode_group.add_argument("--verify-repeat-loop", action="store",
|
||||
default=10,
|
||||
help="Number of iterations for a run that reloads each test without restart.",
|
||||
type=int)
|
||||
mode_group.add_argument("--verify-repeat-restart", action="store",
|
||||
default=5,
|
||||
help="Number of iterations, for a run that restarts the runner between each iteration",
|
||||
type=int)
|
||||
chaos_mode_group = mode_group.add_mutually_exclusive_group()
|
||||
chaos_mode_group.add_argument("--verify-no-chaos-mode", action="store_false",
|
||||
default=True,
|
||||
dest="verify_chaos_mode",
|
||||
help="Disable chaos mode when running on Firefox")
|
||||
chaos_mode_group.add_argument("--verify-chaos-mode", action="store_true",
|
||||
default=True,
|
||||
dest="verify_chaos_mode",
|
||||
help="Enable chaos mode when running on Firefox")
|
||||
mode_group.add_argument("--verify-max-time", action="store",
|
||||
default=None,
|
||||
help="The maximum number of minutes for the job to run",
|
||||
type=lambda x: timedelta(minutes=float(x)))
|
||||
output_results_group = mode_group.add_mutually_exclusive_group()
|
||||
output_results_group.add_argument("--verify-no-output-results", action="store_false",
|
||||
dest="verify_output_results",
|
||||
default=True,
|
||||
help="Prints individuals test results and messages")
|
||||
output_results_group.add_argument("--verify-output-results", action="store_true",
|
||||
dest="verify_output_results",
|
||||
default=True,
|
||||
help="Disable printing individuals test results and messages")
|
||||
|
||||
test_selection_group = parser.add_argument_group("Test Selection")
|
||||
test_selection_group.add_argument("--test-types", action="store",
|
||||
|
|
|
@ -288,8 +288,13 @@ def run_tests(config, test_paths, product, **kwargs):
|
|||
|
||||
def check_stability(**kwargs):
|
||||
import stability
|
||||
return stability.check_stability(logger, **kwargs)
|
||||
|
||||
return stability.check_stability(logger,
|
||||
max_time=kwargs['verify_max_time'],
|
||||
chaos_mode=kwargs['verify_chaos_mode'],
|
||||
repeat_loop=kwargs['verify_repeat_loop'],
|
||||
repeat_restart=kwargs['verify_repeat_restart'],
|
||||
output_results=kwargs['verify_output_results'],
|
||||
**kwargs)
|
||||
|
||||
def start(**kwargs):
|
||||
if kwargs["list_test_groups"]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue