зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1680802: Install marionette requirements with legacy resolver r=sheehan
Marionette requirements fail to install with the new pip resolver due to a conflict between `h2` and `wptserve`. Use the legacy resolver with Marionette until the dependencies are reorganized by the Marionette maintainers. Depends on D99940 Differential Revision: https://phabricator.services.mozilla.com/D100811
This commit is contained in:
Родитель
f4a03e538f
Коммит
51b1c98bf1
|
@ -126,6 +126,7 @@ class VirtualenvMixin(object):
|
|||
optional=False,
|
||||
two_pass=False,
|
||||
editable=False,
|
||||
legacy_resolver=False,
|
||||
):
|
||||
"""Register a module to be installed with the virtualenv.
|
||||
|
||||
|
@ -136,7 +137,16 @@ class VirtualenvMixin(object):
|
|||
applied.
|
||||
"""
|
||||
self._virtualenv_modules.append(
|
||||
(name, url, method, requirements, optional, two_pass, editable)
|
||||
(
|
||||
name,
|
||||
url,
|
||||
method,
|
||||
requirements,
|
||||
optional,
|
||||
two_pass,
|
||||
editable,
|
||||
legacy_resolver,
|
||||
)
|
||||
)
|
||||
|
||||
def query_virtualenv_path(self):
|
||||
|
@ -250,6 +260,7 @@ class VirtualenvMixin(object):
|
|||
global_options=[],
|
||||
no_deps=False,
|
||||
editable=False,
|
||||
legacy_resolver=False,
|
||||
):
|
||||
"""
|
||||
Install module via pip.
|
||||
|
@ -280,6 +291,8 @@ class VirtualenvMixin(object):
|
|||
command = [pip, "install"]
|
||||
if no_deps:
|
||||
command += ["--no-deps"]
|
||||
if legacy_resolver:
|
||||
command += ["--use-deprecated=legacy-resolver"]
|
||||
# To avoid timeouts with our pypi server, increase default timeout:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1007230#c802
|
||||
command += ["--timeout", str(c.get("pip_timeout", 120))]
|
||||
|
@ -505,6 +518,7 @@ class VirtualenvMixin(object):
|
|||
optional,
|
||||
two_pass,
|
||||
editable,
|
||||
legacy_resolver,
|
||||
) in self._virtualenv_modules:
|
||||
if two_pass:
|
||||
self.install_module(
|
||||
|
@ -515,6 +529,7 @@ class VirtualenvMixin(object):
|
|||
optional=optional,
|
||||
no_deps=True,
|
||||
editable=editable,
|
||||
legacy_resolver=legacy_resolver,
|
||||
)
|
||||
self.install_module(
|
||||
module=module,
|
||||
|
@ -523,6 +538,7 @@ class VirtualenvMixin(object):
|
|||
requirements=requirements or (),
|
||||
optional=optional,
|
||||
editable=editable,
|
||||
legacy_resolver=legacy_resolver,
|
||||
)
|
||||
|
||||
self.info("Done creating virtualenv %s." % venv_path)
|
||||
|
|
|
@ -163,14 +163,14 @@ class AWSY(TestingMixin, MercurialScript, TooltoolMixin, CodeCoverageMixin):
|
|||
|
||||
@PreScriptAction("create-virtualenv")
|
||||
def _pre_create_virtualenv(self, action):
|
||||
requirements_files = [
|
||||
os.path.join(self.testdir, "config", "marionette_requirements.txt")
|
||||
]
|
||||
requirements_file = os.path.join(
|
||||
self.testdir, "config", "marionette_requirements.txt"
|
||||
)
|
||||
|
||||
for requirements_file in requirements_files:
|
||||
self.register_virtualenv_module(
|
||||
requirements=[requirements_file], two_pass=True
|
||||
)
|
||||
# marionette_requirements.txt must use the legacy resolver until bug 1684969 is resolved.
|
||||
self.register_virtualenv_module(
|
||||
requirements=[requirements_file], two_pass=True, legacy_resolver=True
|
||||
)
|
||||
|
||||
self.register_virtualenv_module("awsy", self.awsy_path)
|
||||
|
||||
|
|
|
@ -430,12 +430,17 @@ class DesktopUnittest(TestingMixin, MercurialScript, MozbaseMixin, CodeCoverageM
|
|||
self.register_virtualenv_module(name="mock")
|
||||
self.register_virtualenv_module(name="simplejson")
|
||||
|
||||
requirements_files = [
|
||||
os.path.join(
|
||||
dirs["abs_test_install_dir"], "config", "marionette_requirements.txt"
|
||||
)
|
||||
]
|
||||
marionette_requirements_file = os.path.join(
|
||||
dirs["abs_test_install_dir"], "config", "marionette_requirements.txt"
|
||||
)
|
||||
# marionette_requirements.txt must use the legacy resolver until bug 1684969 is resolved.
|
||||
self.register_virtualenv_module(
|
||||
requirements=[marionette_requirements_file],
|
||||
two_pass=True,
|
||||
legacy_resolver=True,
|
||||
)
|
||||
|
||||
requirements_files = []
|
||||
if self._query_specified_suites("mochitest") is not None:
|
||||
# mochitest is the only thing that needs this
|
||||
if PY2:
|
||||
|
|
|
@ -269,7 +269,10 @@ class MarionetteTest(TestingMixin, MercurialScript, TransferMixin, CodeCoverageM
|
|||
"Could not find marionette requirements file: {}".format(requirements)
|
||||
)
|
||||
|
||||
self.register_virtualenv_module(requirements=[requirements], two_pass=True)
|
||||
# marionette_requirements.txt must use the legacy resolver until bug 1684969 is resolved.
|
||||
self.register_virtualenv_module(
|
||||
requirements=[requirements], two_pass=True, legacy_resolver=True
|
||||
)
|
||||
|
||||
def _get_test_suite(self, is_emulator):
|
||||
"""
|
||||
|
|
|
@ -259,7 +259,10 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM
|
|||
dirs["abs_test_install_dir"], "config", "marionette_requirements.txt"
|
||||
)
|
||||
|
||||
self.register_virtualenv_module(requirements=[requirements], two_pass=True)
|
||||
# marionette_requirements.txt must use the legacy resolver until bug 1684969 is resolved.
|
||||
self.register_virtualenv_module(
|
||||
requirements=[requirements], two_pass=True, legacy_resolver=True
|
||||
)
|
||||
|
||||
def _query_geckodriver(self):
|
||||
path = None
|
||||
|
|
Загрузка…
Ссылка в новой задаче