Bug 1372482 - linux 55.0 repack betas are broken because mock can't find python exe, r=aki, a=testing
authorJordan Lund <jlund@mozilla.com>
Mon, 12 Jun 2017 22:16:31 -0700
changeset 411587 6872377277a6
parent 411586 496fd4521a94
child 411588 9f97bc524259
push id7401
push userjlund@mozilla.com
push date2017-06-13 05:40 +0000
treeherdermozilla-beta@6872377277a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki, testing
bugs1372482
milestone55.0
Bug 1372482 - linux 55.0 repack betas are broken because mock can't find python exe, r=aki, a=testing MozReview-Commit-ID: L4VXE6IZE4s
testing/mozharness/scripts/desktop_l10n.py
--- 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',