build: Exit with return code from builds
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Mon, 29 Aug 2016 18:57:36 +0000 (11:57 -0700)
committerUze Choi <uzchoi@samsung.com>
Thu, 8 Sep 2016 01:50:26 +0000 (01:50 +0000)
[Trevor Bramwell <tbramwell@linuxfoundation.org>]
The exit code from scons calls is being silently ignored. Returning the
exit code from 'wait()' in auto_build.py and passing it to 'exit()'
should correctly fail builds.

[Philippe Coval <philippe.coval@osg.samsung.com>]
To sort out and sync ourselves, I added Bug-Id to commit message.
Content is same, feel free keep that link and push over.

Change-Id: I5afce52a3bddf7fb4e6b68acb57a1d51f3034067
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Author: Trevor Bramwell <tbramwell@linuxfoundation.org>
Bug: https://jira.iotivity.org/browse/IOT-1260
Origin: https://gerrit.iotivity.org/gerrit/#/c/11087/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11087
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: David Antler <david.a.antler@intel.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
auto_build.py

index 2471a61e1e98fbe128ba3cdd32639b3a816e30ef..c048dcee59dcf372bf142e873201b11cfd2cd9a5 100644 (file)
@@ -36,7 +36,9 @@ def call_scons(build_options, extra_option_str):
     cmd_line += " " + str(extra_option_str)
 
     print ("Running : " + cmd_line)
-    subprocess.Popen([cmd_line], shell=True).wait()
+    exit_code = subprocess.Popen([cmd_line], shell=True).wait()
+    if exit_code != 0:
+        exit(exit_code)
 
 def build_all(flag, extra_option_str):
     if platform.system() == "Linux":