Bug 1372482 - linux 55.0 repack betas are broken because mock can't find python exe, r=aki, a=testing
MozReview-Commit-ID: L4VXE6IZE4s
--- a/testing/mozharness/scripts/desktop_l10n.py
+++ b/testing/mozharness/scripts/desktop_l10n.py
@@ -693,17 +693,22 @@ class DesktopSingleLocale(LocalesMixin,
def _mach_configure(self):
"""calls mach configure"""
env = self.query_bootstrap_env()
target = ["configure"]
return self._mach(target=target, env=env)
def _get_mach_executable(self):
- return [sys.executable, 'mach']
+ python = sys.executable
+ # A mock environment is a special case, the system python isn't
+ # available there
+ if 'mock_target' in self.config:
+ python = 'python2.7'
+ return [python, 'mach']
def _get_make_executable(self):
config = self.config
dirs = self.query_abs_dirs()
if config.get('enable_mozmake'): # e.g. windows
make = r"/".join([dirs['abs_mozilla_dir'], 'mozmake.exe'])
# mysterious subprocess errors, let's try to fix this path...
make = make.replace('\\', '/')
@@ -1037,18 +1042,24 @@ class DesktopSingleLocale(LocalesMixin,
dirs = self.query_abs_dirs()
manifest_src = os.environ.get('TOOLTOOL_MANIFEST')
if not manifest_src:
manifest_src = config.get('tooltool_manifest_src')
if not manifest_src:
return self.warning(ERROR_MSGS['tooltool_manifest_undetermined'])
tooltool_manifest_path = os.path.join(dirs['abs_mozilla_dir'],
manifest_src)
+ python = sys.executable
+ # A mock environment is a special case, the system python isn't
+ # available there
+ if 'mock_target' in self.config:
+ python = 'python2.7'
+
cmd = [
- sys.executable, '-u',
+ python, '-u',
os.path.join(dirs['abs_mozilla_dir'], 'mach'),
'artifact',
'toolchain',
'-v',
'--retry', '4',
'--tooltool-manifest',
tooltool_manifest_path,
'--tooltool-url',