slaprunner: Set MAKEFLAGS when launching slapgrid

parent 0f7a4d3e
...@@ -11,6 +11,7 @@ import shutil ...@@ -11,6 +11,7 @@ import shutil
import string import string
import hashlib import hashlib
import signal import signal
import multiprocessing
...@@ -164,7 +165,11 @@ def runSoftwareWithLock(config): ...@@ -164,7 +165,11 @@ def runSoftwareWithLock(config):
logfile = open(config['software_log'], 'w') logfile = open(config['software_log'], 'w')
if not updateProxy(config): if not updateProxy(config):
return False return False
slapgrid = Popen([config['slapgrid_sr'], '-vc', config['configuration_file_path']], stdout=logfile) # Accelerate compilation by setting make -jX
environment = os.environ.copy()
environment['MAKEFLAGS'] = '-j%r' % multiprocessing.cpu_count()
slapgrid = Popen([config['slapgrid_sr'], '-vc',
config['configuration_file_path']], stdout=logfile, env=environment)
writePid(slapgrid_pid, slapgrid.pid) writePid(slapgrid_pid, slapgrid.pid)
slapgrid.wait() slapgrid.wait()
#Saves the current compile software for re-use #Saves the current compile software for re-use
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment