Add --release option to mic command line
authorEd Bartosh <eduard.bartosh@intel.com>
Sun, 15 Sep 2013 13:18:04 +0000 (16:18 +0300)
committerHasan Wan <hasan.wan@intel.com>
Mon, 16 Sep 2013 07:34:50 +0000 (00:34 -0700)
Rsync expects output results in mic/out/<build number>. Mic creates
<build number> subdirectory only when --release option is provided.

Adding extra command line options implementeed in mic appliance. Now
it's possible to provide additional options for mic in mic/out/command
file. This trick is utilized in this change.
job_imager puts '--release <build number>' to mic/out/command and mic
inside mic appliance uses it.

Change-Id: I2b83474fdacd59b9a9ff9e5c83f7ab9100e51513
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Reviewed-on: https://otctools.jf.intel.com/review/6438
Tested-by: OTC Tools Tester <ed.bartosh@linux.intel.com>
Reviewed-by: Lin A Yang <lin.a.yang@intel.com>
Reviewed-by: Hasan Wan <hasan.wan@intel.com>
job_imager.py

index badc48e..f4d63b8 100755 (executable)
@@ -84,6 +84,10 @@ def main():
             print 'VM image %s is not found' % vm_image
             return -1
 
+        # Add --release option to mic command line
+        with open(os.path.join(outdir, 'command'), 'w') as fcmdl:
+            fcmdl.write('--release %s' % build_id)
+
         print 'starting mic inside VM to create image'
         ret = run_inside_vm(vm_image, os.getenv("VM_MEMORY", 8192),
                             os.getenv("VM_CPUS", 8), basedir)