Bug 927672 - Force pymake to fall back to mozmake when run on build slaves. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 25 Mar 2014 15:51:13 +0900
changeset 175857 e3d67b56a9e837758276d78b5fa438c603aa623f
parent 175856 b8e21f2401a8578df16c8860abf554a8a1aad1ab
child 175858 0a0ef0583c2af9d02489dbc6ea52c194e7a60e67
push id26500
push userkwierso@gmail.com
push dateFri, 28 Mar 2014 23:16:18 +0000
treeherdermozilla-central@88ae1bfaaf3d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs927672
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 927672 - Force pymake to fall back to mozmake when run on build slaves. r=gps
build/pymake/make.py
--- a/build/pymake/make.py
+++ b/build/pymake/make.py
@@ -7,16 +7,30 @@ A drop-in or mostly drop-in replacement 
 """
 
 import sys, os
 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)
 
   gc.disable()
 
   pymake.command.main(sys.argv[1:], os.environ, os.getcwd(), cb=sys.exit)
   pymake.process.ParallelContext.spin()
   assert False, "Not reached"