During a run of 'auto_build.py', stdout buffering get taken over by the
subprocess module, causing print statements in 'auto_build.py' to not
output until the very end of a build. Calling 'sys.stdout.flush()'
causes stdout to be output before the next call to 'subprocess'.
Change-Id: Ibb193b5d30458a3d9be20d418ee22cac302ee819
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11823
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
(cherry picked from commit
7b858e89dfffdd08a6084a590fa87cb8e70ea132)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14089
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
cmd_line += " " + str(extra_option_str)
print ("Running : " + cmd_line)
+ sys.stdout.flush()
exit_code = subprocess.Popen([cmd_line], shell=True).wait()
if exit_code != 0:
exit(exit_code)