Bug 1361912 - Don't invoke `mach build` through bash.exe; r=ted
authorGregory Szorc <gps@mozilla.com>
Wed, 03 May 2017 18:16:58 -0700
changeset 576515 6a82d640aa274f6532528bd45d9e86ede901f44d
parent 576514 23050ffaf6490bb3d7811d586eb174b3c85fd4d6
child 576519 a05eebc81c2b8f74733f6fa3be592b10488f47ac
child 576542 266e09e18a8e7ba8e9da62d819985e484f939dcb
push id58380
push usergszorc@mozilla.com
push dateThu, 11 May 2017 19:43:38 +0000
reviewersted
bugs1361912, 1279011
milestone55.0a1
Bug 1361912 - Don't invoke `mach build` through bash.exe; r=ted Executing `mach build` through bash.exe was introduced by 5f379c98b962 / bug 1279011. Why, I don't know. Literally every other invocation of `mach` in mozharness does it directly or via a Python executable (the latter is necessary on Windows since `mach` is not a win32 executable). So, this commit removes bash.exe and executes `mach` via Python like everyone else. MozReview-Commit-ID: GFNUVbfHZdq
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -1630,26 +1630,18 @@ or run without that action (ie: --no-{ac
         dirs = self.query_abs_dirs()
         buildprops = os.path.join(dirs['base_work_dir'], 'buildprops.json')
         # not finding buildprops is not an error outside of buildbot
         if os.path.exists(buildprops):
             self.copyfile(
                 buildprops,
                 os.path.join(dirs['abs_work_dir'], 'buildprops.json'))
 
-        if 'MOZILLABUILD' in os.environ:
-            mach = [
-                os.path.join(os.environ['MOZILLABUILD'], 'msys', 'bin', 'bash.exe'),
-                os.path.join(dirs['abs_src_dir'], 'mach')
-            ]
-        else:
-            mach = [sys.executable, 'mach']
-
         return_code = self.run_command_m(
-            command=mach + ['--log-no-times', 'build', '-v'],
+            command=[sys.executable, 'mach', '--log-no-times', 'build', '-v'],
             cwd=dirs['abs_src_dir'],
             env=env,
             output_timeout=self.config.get('max_build_output_timeout', 60 * 40)
         )
         if return_code:
             self.return_code = self.worst_level(
                 EXIT_STATUS_DICT[TBPL_FAILURE],  self.return_code,
                 AUTOMATION_EXIT_CODES[::-1]