From: hyokeun Date: Thu, 27 Apr 2017 05:07:24 +0000 (+0900) Subject: Use separate mic.conf file for each build X-Git-Tag: submit/trunk/20190927.012743~471 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F127355%2F2;p=services%2Fjenkins-scripts.git Use separate mic.conf file for each build By default, /var/tmp/mic/ will be used for mic tool. If we run multiple mic on the same machine, this shared working directory lead to problem. Fix: Use separate working directory controlled by configuration. $ sudo mic cr auto -c { conf file } ... Change-Id: I4bd7f1ed44e843134e7e7c517d285534c93839bf --- diff --git a/job_imager.py b/job_imager.py index 99647b8..954c1fe 100755 --- a/job_imager.py +++ b/job_imager.py @@ -277,8 +277,15 @@ def main(): 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