From 3fd5ad6bb2bce1a159228c905ee807bb56c59efe Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 25 Mar 2014 15:51:13 +0900 Subject: [PATCH] Bug 927672 - Force pymake to fall back to mozmake when run on build slaves. r=gps --- build/pymake/make.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build/pymake/make.py b/build/pymake/make.py index 8379b71f01a..6334b464c46 100755 --- a/build/pymake/make.py +++ b/build/pymake/make.py @@ -12,6 +12,20 @@ import pymake.command, pymake.process import gc if __name__ == '__main__': + if 'TINDERBOX_OUTPUT' in os.environ: + # When building on mozilla build slaves, execute mozmake instead. Until bug + # 978211, this is the easiest, albeit hackish, way to do this. + import subprocess + mozmake = os.path.join(os.path.dirname(__file__), '..', '..', + 'mozmake.exe') + if os.path.exists(mozmake): + cmd = [mozmake] + cmd.extend(sys.argv[1:]) + shell = os.environ.get('SHELL') + if shell and not shell.lower().endswith('.exe'): + cmd += ['SHELL=%s.exe' % shell] + sys.exit(subprocess.call(cmd)) + sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0)