summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-05-29 06:58:05 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-05-31 18:00:40 +0000
commite85433b08ef25ed5c361a9688eaced75c3def3af (patch)
treec74e18934221161c5b90b7c9e5ec184a22f66246
parent889caf7e9bbdbbe82e4d04774bcc4349572c5c76 (diff)
tcwg-benchmark.sh: Avoid stale containers
... by setting up trap handler before start-container-docker.sh. It turns out that if build is aborted, then we finish creating the container, but don't install the trap handler. It is not clear whether this patch will solve the problem or not, but it is worth a try. Change-Id: I8cfb4b0bdd5c2b1a3374a4e85e7151dd237e1108
-rwxr-xr-xtcwg-benchmark.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh
index 5ae4b5a5..e5463001 100755
--- a/tcwg-benchmark.sh
+++ b/tcwg-benchmark.sh
@@ -31,15 +31,14 @@ else
docker_host_opt="--label $builder"
fi
+# Make sure to cleanup build container if something goes
+# wrong when preparing the test environment
+trap "cleanup_all_containers" EXIT
./start-container-docker.sh $docker_host_opt --distro trusty --task build --prefix build_ > build-container.sh
build_container_host=
build_container_port=
. ./build-container.sh
-# Make sure to cleanup build container if something goes
-# wrong when preparing the test environment
-trap "cleanup_all_containers" EXIT
-
. jenkins-helpers.sh
case "$toolchain_url" in