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 413945 6872377277a618b2b9e0d2b4c2b9e51765ac199e
parent 413944 496fd4521a947593a9e46daca2bc42bd73ea49af
child 413946 9f97bc5242590a32204233597ca24ad39ff42847
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [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',