From: David Warburton Date: Mon, 22 Dec 2014 17:50:43 +0000 (-0500) Subject: Fail the build if one step fails X-Git-Tag: 1.2.0+RC1~2024 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7f3f572f4e904e9f490600cbd5bee836f86083e;p=platform%2Fupstream%2Fiotivity.git Fail the build if one step fails Setting this option in the bash script will cause the script to terminate if any of the commands returns a with non-zero value. This is necessary for the build server to understand when a build is failed. Without this flag, the script will exit with the status of the last command, which in this script is "echo" so it will be 0, regardless if a scons build step failed. Ideally we would try each step and then report the failures at the end, set -e will do the job until that can be developed. Change-Id: Ib6692d434a2e811f61d8dd1bff52766b7511abd7 Signed-off-by: David Warburton --- diff --git a/auto_build.sh b/auto_build.sh index 9f947eb..4edc0e0 100755 --- a/auto_build.sh +++ b/auto_build.sh @@ -1,5 +1,9 @@ #! /bin/bash +# Ideally we will capture the exit code of each step and try them all before failing +# the build script. For now, use set -e and fail the build at first failure. +set -e + function clean() { echo "*********** Clean build *************"