# HG changeset patch # User Tom Prince # Date 1581369078 0 # Node ID 5db1dc4cff3d9bf2da405ed3c1eadf222fcdc4ec # Parent 2ee418d0a92b5ac7381ad8efeb1f0b9bc84bb699 Bug 1527313: [mozharness] Fail if we can't find the mozbase requirements file; r=ahal The alternative code path was unused (as demonstrated by the presence of `manifestdestiny` package). Remove that code path, so we can fail with a better error message, if we don't have the right path to the requirements file. Differential Revision: https://phabricator.services.mozilla.com/D62338 diff --git a/testing/mozharness/mozharness/mozilla/mozbase.py b/testing/mozharness/mozharness/mozilla/mozbase.py --- a/testing/mozharness/mozharness/mozilla/mozbase.py +++ b/testing/mozharness/mozharness/mozilla/mozbase.py @@ -13,29 +13,14 @@ class MozbaseMixin(object): def _install_mozbase(self, action): dirs = self.query_abs_dirs() requirements = os.path.join( dirs['abs_test_install_dir'], 'config', self.config.get('mozbase_requirements', 'mozbase_requirements.txt') ) - if os.path.isfile(requirements): - self.register_virtualenv_module(requirements=[requirements], - two_pass=True) - return + if not os.path.isfile(requirements): + self.fatal( + "Could not find mozbase requirements file: {}".format(requirements) + ) - # XXX Bug 879765: Dependent modules need to be listed before parent - # modules, otherwise they will get installed from the pypi server. - # XXX Bug 908356: This block can be removed as soon as the - # in-tree requirements files propagate to all active trees. - mozbase_dir = os.path.join('tests', 'mozbase') - self.register_virtualenv_module( - 'manifestparser', - url=os.path.join(mozbase_dir, 'manifestdestiny') - ) - - for m in ('mozfile', 'mozlog', 'mozinfo', 'moznetwork', 'mozhttpd', - 'mozcrash', 'mozinstall', 'mozdevice', 'mozprofile', - 'mozprocess', 'mozrunner'): - self.register_virtualenv_module( - m, url=os.path.join(mozbase_dir, m) - ) + self.register_virtualenv_module(requirements=[requirements], two_pass=True)