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
--- 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]