aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/dockerize
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-10-07 12:59:08 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-10-07 13:13:32 +0200
commite480a6a1f91e1167c33d08a208e3fabfee940584 (patch)
tree92fe611467ecb258bd44ad4e2496577677c17d84 /tools/run_tests/dockerize
parent602edbba8cf03279b3dc2e027ea07660332f806e (diff)
dont eat run_tests.py errors on test failure
Diffstat (limited to 'tools/run_tests/dockerize')
-rwxr-xr-xtools/run_tests/dockerize/build_docker_and_run_tests.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/run_tests/dockerize/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh
index b4b172ddef..c3219c533d 100755
--- a/tools/run_tests/dockerize/build_docker_and_run_tests.sh
+++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh
@@ -61,6 +61,7 @@ CONTAINER_NAME="run_tests_$(uuidgen)"
docker_instance_git_root=/var/local/jenkins/grpc
# Run tests inside docker
+DOCKER_EXIT_CODE=0
docker run \
-e "RUN_TESTS_COMMAND=$RUN_TESTS_COMMAND" \
-e "config=$config" \
@@ -81,7 +82,7 @@ docker run \
-w /var/local/git/grpc \
--name=$CONTAINER_NAME \
$DOCKER_IMAGE_NAME \
- bash -l "/var/local/jenkins/grpc/$DOCKER_RUN_SCRIPT" || DOCKER_FAILED="true"
+ bash -l "/var/local/jenkins/grpc/$DOCKER_RUN_SCRIPT" || DOCKER_EXIT_CODE=$?
# use unique name for reports.zip to prevent clash between concurrent
# run_tests.py runs
@@ -93,7 +94,4 @@ rm -f ${TEMP_REPORTS_ZIP}
# remove the container, possibly killing it first
docker rm -f $CONTAINER_NAME || true
-if [ "$DOCKER_FAILED" != "" ] && [ "$XML_REPORT" == "" ]
-then
- exit 1
-fi
+exit $DOCKER_EXIT_CODE