Fail the build if one step fails
authorDavid Warburton <david.warburton@intel.com>
Mon, 22 Dec 2014 17:50:43 +0000 (12:50 -0500)
committerDavid Warburton <david.warburton@intel.com>
Mon, 22 Dec 2014 18:16:59 +0000 (13:16 -0500)
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 <david.warburton@intel.com>
auto_build.sh

index 9f947eb..4edc0e0 100755 (executable)
@@ -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 *************"