summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-05-27 09:09:37 +0200
committerOliver Smith <osmith@sysmocom.de>2020-05-27 11:32:17 +0200
commit449a2443f59709fec2d250b631f15d9c82df6f72 (patch)
tree0529df96aecd7d7d7be8ce5c42c321ef3f1a8835
parentd6d0a45d4bfe6ecb733323b8c464cbd58a87c3ac (diff)
repo-install-test: use sh -ex
Make it consistent with run-inside-docker.sh by also using -e and -x. This makes development easier. Change-Id: I733164829bf076fb42df3fde725f3e330f8abecc
-rwxr-xr-xscripts/repo-install-test.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index d3ce8d6..0a19b04 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -ex
. "$(dirname "$0")/common.sh"
docker_images_require "debian-repo-install-test"
@@ -46,12 +46,14 @@ docker run --rm \
check_if_systemd_is_running
# Run the test script
-docker exec "$CONTAINER" /repo-install-test/run-inside-docker.sh
-ret="$?"
+ret=0
+if ! docker exec "$CONTAINER" /repo-install-test/run-inside-docker.sh; then
+ ret=1
+fi
# Interactive shell
if [ -n "$INTERACTIVE" ]; then
- docker exec -it "$CONTAINER" bash
+ docker exec -it "$CONTAINER" bash || true
fi
docker container kill "$CONTAINER"