if not os.path.exists(cache):
os.makedirs(cache)
- mic_cmd = "sudo /usr/bin/mic cr auto %s --release %s -o %s -k %s "\
- '--logfile=%s' % (ksf, build_id, outdir, cache, log)
+ # Use separate mic.conf file for each thread.
+ if os.getenv('MIC_WORK_DIR') and os.getenv('MIC_CONF_FILE'):
+ mic_conf_file = os.getenv('MIC_CONF_FILE')
+ print 'Set mic conf file: %s' % mic_conf_file
+ mic_cmd = "sudo /usr/bin/mic cr auto -c %s %s --release %s -o %s -k %s "\
+ '--logfile=%s' % (mic_conf_file, ksf, build_id, outdir, cache, log)
+ else:
+ mic_cmd = "sudo /usr/bin/mic cr auto %s --release %s -o %s -k %s "\
+ '--logfile=%s' % (ksf, build_id, outdir, cache, log)
sys.stdout.flush()
print 'starting mic to create image: %s' % mic_cmd