diff --git a/testing/mozharness/mozharness/base/python.py b/testing/mozharness/mozharness/base/python.py index 745e515b23a0..4801ea804ae9 100644 --- a/testing/mozharness/mozharness/base/python.py +++ b/testing/mozharness/mozharness/base/python.py @@ -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) diff --git a/testing/mozharness/scripts/awsy_script.py b/testing/mozharness/scripts/awsy_script.py index 9c5a4519aa4d..288c17aae107 100644 --- a/testing/mozharness/scripts/awsy_script.py +++ b/testing/mozharness/scripts/awsy_script.py @@ -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) diff --git a/testing/mozharness/scripts/desktop_unittest.py b/testing/mozharness/scripts/desktop_unittest.py index 8ea2aa532852..35416f2f3a5f 100755 --- a/testing/mozharness/scripts/desktop_unittest.py +++ b/testing/mozharness/scripts/desktop_unittest.py @@ -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: diff --git a/testing/mozharness/scripts/marionette.py b/testing/mozharness/scripts/marionette.py index aceebb0648bd..9524983d1d33 100755 --- a/testing/mozharness/scripts/marionette.py +++ b/testing/mozharness/scripts/marionette.py @@ -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): """ diff --git a/testing/mozharness/scripts/web_platform_tests.py b/testing/mozharness/scripts/web_platform_tests.py index 70fd0e932895..d0fcf54c046c 100755 --- a/testing/mozharness/scripts/web_platform_tests.py +++ b/testing/mozharness/scripts/web_platform_tests.py @@ -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