Flush stdout to make Jenkins console output better
authorEd Bartosh <eduard.bartosh@intel.com>
Sun, 15 Sep 2013 14:59:13 +0000 (17:59 +0300)
committerHasan Wan <hasan.wan@intel.com>
Mon, 16 Sep 2013 07:42:20 +0000 (00:42 -0700)
Without flushing output of job_imager.py comes to jenkins build
console after output of mic appliance. Flushing helps to bring output
back to chronological order.

Change-Id: I3714f172874b2b583554a51ffaf5ed11e2dbf349
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Reviewed-on: https://otctools.jf.intel.com/review/6440
Reviewed-by: Hasan Wan <hasan.wan@intel.com>
Tested-by: OTC Tools Tester <ed.bartosh@linux.intel.com>
job_imager.py

index c4b48c2..60978ae 100755 (executable)
@@ -89,6 +89,7 @@ def main():
             fcmdl.write('--release %s' % build_id)
 
         print 'starting mic inside VM to create image'
+        sys.stdout.flush()
         ret = run_inside_vm(vm_image, os.getenv("VM_MEMORY", 8192),
                             os.getenv("VM_CPUS", 8), basedir)
         # workaround for qemu/9p bug in mapping permissions