mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Update web-platform-tests to revision b704e37ec97fe90b3a3d59c10f78c21907b5b576
This commit is contained in:
parent
cc0ac89e1a
commit
9f516d3717
70 changed files with 1688 additions and 806 deletions
|
@ -264,6 +264,8 @@ class Chrome(BrowserSetup):
|
|||
if kwargs["browser_channel"] == "dev":
|
||||
logger.info("Automatically turning on experimental features for Chrome Dev")
|
||||
kwargs["binary_args"].append("--enable-experimental-web-platform-features")
|
||||
# TODO(foolip): remove after unified plan is enabled on Chrome stable
|
||||
kwargs["binary_args"].append("--enable-features=RTCUnifiedPlanByDefault")
|
||||
|
||||
# Allow audio autoplay without a user gesture.
|
||||
kwargs["binary_args"].append("--autoplay-policy=no-user-gesture-required")
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
import zipfile
|
||||
from io import BytesIO
|
||||
|
@ -49,20 +48,6 @@ def call(*args):
|
|||
raise
|
||||
|
||||
|
||||
def get_git_cmd(repo_path):
|
||||
"""Create a function for invoking git commands as a subprocess."""
|
||||
def git(cmd, *args):
|
||||
full_cmd = ["git", cmd] + list(args)
|
||||
try:
|
||||
logger.debug(" ".join(full_cmd))
|
||||
return subprocess.check_output(full_cmd, cwd=repo_path, stderr=subprocess.STDOUT).strip()
|
||||
except subprocess.CalledProcessError as e:
|
||||
logger.error("Git command exited with status %i" % e.returncode)
|
||||
logger.error(e.output)
|
||||
sys.exit(1)
|
||||
return git
|
||||
|
||||
|
||||
def seekable(fileobj):
|
||||
"""Attempt to use file.seek on given file, with fallbacks."""
|
||||
try:
|
||||
|
@ -94,21 +79,6 @@ def unzip(fileobj, dest=None, limit=None):
|
|||
os.chmod(os.path.join(dest, info.filename), perm)
|
||||
|
||||
|
||||
class pwd(object):
|
||||
"""Create context for temporarily changing present working directory."""
|
||||
def __init__(self, dir):
|
||||
self.dir = dir
|
||||
self.old_dir = None
|
||||
|
||||
def __enter__(self):
|
||||
self.old_dir = os.path.abspath(os.curdir)
|
||||
os.chdir(self.dir)
|
||||
|
||||
def __exit__(self, *args, **kwargs):
|
||||
os.chdir(self.old_dir)
|
||||
self.old_dir = None
|
||||
|
||||
|
||||
def get(url):
|
||||
"""Issue GET request to a given URL and return the response."""
|
||||
import requests
|
||||
|
|
|
@ -818,14 +818,10 @@ class ManagerGroup(object):
|
|||
self.pool.add(manager)
|
||||
self.wait()
|
||||
|
||||
def is_alive(self):
|
||||
"""Boolean indicating whether any manager in the group is still alive"""
|
||||
return any(manager.is_alive() for manager in self.pool)
|
||||
|
||||
def wait(self):
|
||||
"""Wait for all the managers in the group to finish"""
|
||||
for item in self.pool:
|
||||
item.join()
|
||||
for manager in self.pool:
|
||||
manager.join()
|
||||
|
||||
def stop(self):
|
||||
"""Set the stop flag so that all managers in the group stop as soon
|
||||
|
@ -834,7 +830,7 @@ class ManagerGroup(object):
|
|||
self.logger.debug("Stop flag set in ManagerGroup")
|
||||
|
||||
def test_count(self):
|
||||
return sum(item.test_count for item in self.pool)
|
||||
return sum(manager.test_count for manager in self.pool)
|
||||
|
||||
def unexpected_count(self):
|
||||
return sum(item.unexpected_count for item in self.pool)
|
||||
return sum(manager.unexpected_count for manager in self.pool)
|
||||
|
|
|
@ -275,8 +275,8 @@ def run_tests(config, test_paths, product, **kwargs):
|
|||
logger.critical("Main thread got signal")
|
||||
manager_group.stop()
|
||||
raise
|
||||
test_count += manager_group.test_count()
|
||||
unexpected_count += manager_group.unexpected_count()
|
||||
test_count += manager_group.test_count()
|
||||
unexpected_count += manager_group.unexpected_count()
|
||||
|
||||
test_total += test_count
|
||||
unexpected_total += unexpected_count
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue