From 70580e521b7560d34a357fb40cb48388de7bedae Mon Sep 17 00:00:00 2001 From: Kyle Mestery Date: Fri, 15 Jul 2016 18:38:23 +0000 Subject: [PATCH] Add error handling Add some initial error handling into the CI scripts Closes Issue #69 Signed-off-by: Kyle Mestery --- ci/docker-rally.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ci/docker-rally.sh b/ci/docker-rally.sh index 7d99db1..d18630c 100755 --- a/ci/docker-rally.sh +++ b/ci/docker-rally.sh @@ -4,6 +4,9 @@ XTRACE=$(set +o | grep xtrace) set -o xtrace +# Track failures +FAILED=0 + OVS_REPO=${1:-https://github.com/openvswitch/ovs.git} OVS_BRANCH=${2:-master} @@ -12,13 +15,15 @@ echo "OVS_REPO=${OVS_REPO} OVS_BRANCH=${OVS_BRANCH}" # A combined script to run all the things # Prepare the environment -./prepare.sh +./prepare.sh || FAILED=$(( $FAILED + 1 )) # Run the testsuite -./scale-run.sh $OVS_REPO $OVS_BRANCH +./scale-run.sh $OVS_REPO $OVS_BRANCH || FAILED=$(( $FAILED + 1 )) # Clean things up -./scale-cleanup.sh +./scale-cleanup.sh || FAILED=$(( $FAILED + 1 )) + +return $FAILED # Restore xtrace $XTRACE