aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/dockerize
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-10-04 08:39:25 +0200
committerGravatar GitHub <noreply@github.com>2016-10-04 08:39:25 +0200
commit08ce4b92c231496102d768c18f6ae94403fb6878 (patch)
treefed9de5fa5878b6c39d86d65f8f9dd92512b1307 /tools/run_tests/dockerize
parent1d06e82aa077c036ed9fdd3d381b6b87d4d06497 (diff)
parent7b9c21ab2c467df62ab3c871e6544cfb70a23a44 (diff)
Merge pull request #8141 from jtattermusch/matrix_tests_made_easy
Script for running a matrix of run_tests.py instances at once.
Diffstat (limited to 'tools/run_tests/dockerize')
-rwxr-xr-xtools/run_tests/dockerize/build_docker_and_run_tests.sh12
-rwxr-xr-xtools/run_tests/dockerize/docker_run_tests.sh3
2 files changed, 8 insertions, 7 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 c2ea6f2c6e..b4b172ddef 100755
--- a/tools/run_tests/dockerize/build_docker_and_run_tests.sh
+++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh
@@ -44,9 +44,6 @@ mkdir -p /tmp/ccache
# its cache location now that --download-cache is deprecated).
mkdir -p /tmp/xdg-cache-home
-# Create a local branch so the child Docker script won't complain
-git branch -f jenkins-docker
-
# Inputs
# DOCKERFILE_DIR - Directory in which Dockerfile file is located.
# DOCKER_RUN_SCRIPT - Script to run under docker (relative to grpc repo root)
@@ -86,9 +83,12 @@ docker run \
$DOCKER_IMAGE_NAME \
bash -l "/var/local/jenkins/grpc/$DOCKER_RUN_SCRIPT" || DOCKER_FAILED="true"
-docker cp "$CONTAINER_NAME:/var/local/git/grpc/reports.zip" $git_root || true
-unzip -o $git_root/reports.zip -d $git_root || true
-rm -f reports.zip
+# use unique name for reports.zip to prevent clash between concurrent
+# run_tests.py runs
+TEMP_REPORTS_ZIP=`mktemp`
+docker cp "$CONTAINER_NAME:/var/local/git/grpc/reports.zip" ${TEMP_REPORTS_ZIP} || true
+unzip -o ${TEMP_REPORTS_ZIP} -d $git_root || true
+rm -f ${TEMP_REPORTS_ZIP}
# remove the container, possibly killing it first
docker rm -f $CONTAINER_NAME || true
diff --git a/tools/run_tests/dockerize/docker_run_tests.sh b/tools/run_tests/dockerize/docker_run_tests.sh
index 8c6143d24f..ef02d26625 100755
--- a/tools/run_tests/dockerize/docker_run_tests.sh
+++ b/tools/run_tests/dockerize/docker_run_tests.sh
@@ -63,6 +63,7 @@ echo '</body></html>' >> index.html
cd ..
zip -r reports.zip reports
-find . -name report.xml | xargs zip reports.zip
+find . -name report.xml | xargs -r zip reports.zip
+find . -name 'report_*.xml' | xargs -r zip reports.zip
exit $exit_code