mirror of
https://github.com/servo/servo.git
synced 2025-08-22 05:45:33 +01:00
Update web-platform-tests to revision 3cb5a99e5521936fb8819de8aaba806050b84184
This commit is contained in:
parent
1d2c0ba0bc
commit
c700482629
204 changed files with 5112 additions and 1445 deletions
|
@ -1,3 +1,3 @@
|
|||
mypy==0.701
|
||||
mypy==0.710
|
||||
mypy-extensions==0.4.1
|
||||
typed-ast==1.3.5
|
||||
|
|
|
@ -8,6 +8,7 @@ import json
|
|||
import logging
|
||||
import os
|
||||
import platform
|
||||
import signal
|
||||
import socket
|
||||
import sys
|
||||
import threading
|
||||
|
@ -841,12 +842,18 @@ def get_parser():
|
|||
|
||||
|
||||
def run(**kwargs):
|
||||
received_signal = threading.Event()
|
||||
|
||||
with build_config(os.path.join(repo_root, "config.json"),
|
||||
**kwargs) as config:
|
||||
global logger
|
||||
logger = config.logger
|
||||
set_logger(logger)
|
||||
|
||||
def handle_signal(signum, frame):
|
||||
logger.debug("Received signal %s. Shutting down.", signum)
|
||||
received_signal.set()
|
||||
|
||||
bind_address = config["bind_address"]
|
||||
|
||||
if kwargs.get("alias_file"):
|
||||
|
@ -868,20 +875,19 @@ def run(**kwargs):
|
|||
|
||||
with stash.StashServer(stash_address, authkey=str(uuid.uuid4())):
|
||||
servers = start(config, build_routes(config["aliases"]), **kwargs)
|
||||
signal.signal(signal.SIGTERM, handle_signal)
|
||||
signal.signal(signal.SIGINT, handle_signal)
|
||||
|
||||
try:
|
||||
while all(item.is_alive() for item in iter_procs(servers)):
|
||||
for item in iter_procs(servers):
|
||||
item.join(1)
|
||||
exited = [item for item in iter_procs(servers) if not item.is_alive()]
|
||||
subject = "subprocess" if len(exited) == 1 else "subprocesses"
|
||||
|
||||
logger.info("%s %s exited:" % (len(exited), subject))
|
||||
|
||||
while all(item.is_alive() for item in iter_procs(servers)) and not received_signal.is_set():
|
||||
for item in iter_procs(servers):
|
||||
logger.info("Status of %s:\t%s" % (item.name, "running" if item.is_alive() else "not running"))
|
||||
except KeyboardInterrupt:
|
||||
logger.info("Shutting down")
|
||||
item.join(1)
|
||||
exited = [item for item in iter_procs(servers) if not item.is_alive()]
|
||||
subject = "subprocess" if len(exited) == 1 else "subprocesses"
|
||||
|
||||
logger.info("%s %s exited:" % (len(exited), subject))
|
||||
|
||||
for item in iter_procs(servers):
|
||||
logger.info("Status of %s:\t%s" % (item.name, "running" if item.is_alive() else "not running"))
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -413,7 +413,7 @@ class Session(object):
|
|||
if self.session_id is not None:
|
||||
return
|
||||
|
||||
body = {}
|
||||
body = {"capabilities": {}}
|
||||
|
||||
if self.requested_capabilities is not None:
|
||||
body["capabilities"] = self.requested_capabilities
|
||||
|
|
|
@ -357,6 +357,8 @@ class EdgeChromium(BrowserSetup):
|
|||
if kwargs["browser_channel"] == "dev":
|
||||
logger.info("Automatically turning on experimental features for Edge Dev")
|
||||
kwargs["binary_args"].append("--enable-experimental-web-platform-features")
|
||||
# HACK(Hexcles): work around https://github.com/web-platform-tests/wpt/issues/17403
|
||||
kwargs["webdriver_args"].append("--disable-build-check")
|
||||
|
||||
|
||||
class Edge(BrowserSetup):
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Pipes
|
||||
======
|
||||
|
||||
:mod:`Interface <pipes>`
|
||||
------------------------
|
||||
:mod:`Interface <wptserve.pipes>`
|
||||
---------------------------------
|
||||
|
||||
.. automodule:: wptserve.pipes
|
||||
:members:
|
||||
|
|
|
@ -3,8 +3,8 @@ Request
|
|||
|
||||
Request object.
|
||||
|
||||
:mod:`Interface <request>`
|
||||
--------------------------
|
||||
:mod:`Interface <wptserve.request>`
|
||||
-----------------------------------
|
||||
|
||||
.. automodule:: wptserve.request
|
||||
:members:
|
||||
|
|
|
@ -34,8 +34,8 @@ continue to load indefinitely.
|
|||
|
||||
.. _response.Interface:
|
||||
|
||||
:mod:`Interface <response>`
|
||||
---------------------------
|
||||
:mod:`Interface <wptserve.response>`
|
||||
------------------------------------
|
||||
|
||||
.. automodule:: wptserve.response
|
||||
:members:
|
||||
|
|
|
@ -71,8 +71,8 @@ responsible for constructing the response to the HTTP request. See
|
|||
|
||||
.. _router.Interface:
|
||||
|
||||
:mod:`Interface <wptserve>`
|
||||
---------------------------
|
||||
:mod:`Interface <wptserve.router>`
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: wptserve.router
|
||||
:members:
|
||||
|
|
|
@ -13,8 +13,8 @@ run on port 8080 until it is killed::
|
|||
routes=[("GET", "*", handlers.file_handler)])
|
||||
httpd.start(block=True)
|
||||
|
||||
:mod:`Interface <wptserve>`
|
||||
---------------------------
|
||||
:mod:`Interface <wptserve.server>`
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: wptserve.server
|
||||
:members:
|
||||
|
|
|
@ -24,8 +24,8 @@ A typical example of using a stash to store state might be::
|
|||
assert request.server.stash.take(key) is None
|
||||
return key
|
||||
|
||||
:mod:`Interface <stash>`
|
||||
------------------------
|
||||
:mod:`Interface <wptserve.stash>`
|
||||
---------------------------------
|
||||
|
||||
.. automodule:: wptserve.stash
|
||||
:members:
|
||||
|
|
|
@ -342,7 +342,7 @@ def sub(request, response, escape_type="html"):
|
|||
A dictionary of parts of the request URL. Valid keys are
|
||||
'server, 'scheme', 'host', 'hostname', 'port', 'path' and 'query'.
|
||||
'server' is scheme://host:port, 'host' is hostname:port, and query
|
||||
includes the leading '?', but other delimiters are omitted.
|
||||
includes the leading '?', but other delimiters are omitted.
|
||||
headers
|
||||
A dictionary of HTTP headers in the request.
|
||||
header_or_default(header, default)
|
||||
|
|
|
@ -179,11 +179,13 @@ class Response(object):
|
|||
If any part of the content is a function, this will be called
|
||||
and the resulting value (if any) returned.
|
||||
|
||||
:param read_file: - boolean controlling the behaviour when content
|
||||
is a file handle. When set to False the handle will be returned directly
|
||||
allowing the file to be passed to the output in small chunks. When set to
|
||||
True, the entire content of the file will be returned as a string facilitating
|
||||
non-streaming operations like template substitution.
|
||||
:param read_file: boolean controlling the behaviour when content is a
|
||||
file handle. When set to False the handle will be
|
||||
returned directly allowing the file to be passed to
|
||||
the output in small chunks. When set to True, the
|
||||
entire content of the file will be returned as a
|
||||
string facilitating non-streaming operations like
|
||||
template substitution.
|
||||
"""
|
||||
if isinstance(self.content, binary_type):
|
||||
yield self.content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue