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 diff --git a/ci/prepare.sh b/ci/prepare.sh index 19f521f..bd51fef 100755 --- a/ci/prepare.sh +++ b/ci/prepare.sh @@ -119,7 +119,7 @@ if [ "$INSTALLDOCKER" == "True" ] ; then if [ "$OVNSUDO" == "" ] ; then echo "WARNING: The docker group was created and the $OVNUSER user added to this group." echo " Please reboot the box, log back in, and re-run $0." - exit 1 + return 1 fi fi fi diff --git a/ci/scale-run.sh b/ci/scale-run.sh index 8f21b11..8a10633 100755 --- a/ci/scale-run.sh +++ b/ci/scale-run.sh @@ -20,7 +20,7 @@ function check_container_failure { for failed in ${failed_containers}; do docker logs --tail all ${failed} done - exit 1 + return 1 fi } @@ -40,7 +40,7 @@ $OVNSUDO /usr/local/bin/ansible-playbook -i $OVN_DOCKER_HOSTS ansible/site.yml - --extra-vars "ovs_repo=$OVS_REPO" --extra-vars "ovs_branch=$OVS_BRANCH" -e action=deploy if [ "$?" != "0" ] ; then echo "Deploying failed, exiting" - exit 1 + return 1 fi popd