mirror of
https://github.com/servo/servo.git
synced 2025-08-23 14:25:33 +01:00
Update web-platform-tests to revision 2d68590d46a990bf28a08d6384a59962d2e56bf6
This commit is contained in:
parent
bc03d32142
commit
ad4cc3691e
135 changed files with 1613 additions and 341 deletions
|
@ -277,8 +277,6 @@ 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")
|
||||
|
|
|
@ -4,6 +4,8 @@ import sys
|
|||
import logging
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
import pkg_resources
|
||||
|
||||
from tools.wpt.utils import call
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -16,6 +18,7 @@ class Virtualenv(object):
|
|||
self.virtualenv = find_executable("virtualenv")
|
||||
if not self.virtualenv:
|
||||
raise ValueError("virtualenv must be installed and on the PATH")
|
||||
self._working_set = None
|
||||
|
||||
@property
|
||||
def exists(self):
|
||||
|
@ -24,6 +27,7 @@ class Virtualenv(object):
|
|||
def create(self):
|
||||
if os.path.exists(self.path):
|
||||
shutil.rmtree(self.path)
|
||||
self._working_set = None
|
||||
call(self.virtualenv, self.path, "-p", sys.executable)
|
||||
|
||||
@property
|
||||
|
@ -39,6 +43,22 @@ class Virtualenv(object):
|
|||
raise ValueError("pip not found")
|
||||
return path
|
||||
|
||||
@property
|
||||
def lib_path(self):
|
||||
if sys.platform == 'win32':
|
||||
return os.path.join(self.path, 'Lib', 'site-packages')
|
||||
return os.path.join(self.path, 'lib', 'python%s' % sys.version[:3], 'site-packages')
|
||||
|
||||
@property
|
||||
def working_set(self):
|
||||
if not self.exists:
|
||||
raise ValueError("trying to read working_set when venv doesn't exist")
|
||||
|
||||
if self._working_set is None:
|
||||
self._working_set = pkg_resources.WorkingSet((self.lib_path,))
|
||||
|
||||
return self._working_set
|
||||
|
||||
def activate(self):
|
||||
path = os.path.join(self.bin_path, "activate_this.py")
|
||||
execfile(path, {"__file__": path}) # noqa: F821
|
||||
|
@ -49,11 +69,26 @@ class Virtualenv(object):
|
|||
self.activate()
|
||||
|
||||
def install(self, *requirements):
|
||||
try:
|
||||
self.working_set.require(*requirements)
|
||||
except pkg_resources.ResolutionError:
|
||||
pass
|
||||
else:
|
||||
return
|
||||
|
||||
# `--prefer-binary` guards against race conditions when installation
|
||||
# occurs while packages are in the process of being published.
|
||||
call(self.pip_path, "install", "--prefer-binary", *requirements)
|
||||
|
||||
def install_requirements(self, requirements_path):
|
||||
with open(requirements_path) as f:
|
||||
try:
|
||||
self.working_set.require(f.read())
|
||||
except pkg_resources.ResolutionError:
|
||||
pass
|
||||
else:
|
||||
return
|
||||
|
||||
# `--prefer-binary` guards against race conditions when installation
|
||||
# occurs while packages are in the process of being published.
|
||||
call(
|
||||
|
|
|
@ -2,6 +2,6 @@ html5lib==1.0.1
|
|||
mozinfo==0.10
|
||||
mozlog==4.0
|
||||
mozdebug==0.1.1
|
||||
pillow==5.2.0
|
||||
pillow==5.4.1
|
||||
urllib3[secure]==1.24.1
|
||||
requests==2.21.0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
marionette_driver==2.7.0
|
||||
marionette_driver==2.8.0
|
||||
mozprofile==2.2.0
|
||||
mozprocess==1.0.0
|
||||
mozcrash==1.1.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue