From 62690186a4c4289c98e5fbca7392ae37033def9b Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Mon, 29 Aug 2016 11:57:36 -0700 Subject: [PATCH] build: Exit with return code from builds [Trevor Bramwell ] 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 ] 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 Author: Trevor Bramwell Bug: https://jira.iotivity.org/browse/IOT-1260 Origin: https://gerrit.iotivity.org/gerrit/#/c/11087/ Signed-off-by: Philippe Coval Reviewed-on: https://gerrit.iotivity.org/gerrit/11087 Reviewed-by: jihwan seo Tested-by: jenkins-iotivity Reviewed-by: David Antler Reviewed-by: Uze Choi --- auto_build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auto_build.py b/auto_build.py index 2471a61..c048dce 100644 --- a/auto_build.py +++ b/auto_build.py @@ -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": -- 2.7.4