summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-05-27 09:09:37 +0200
committerosmith <osmith@sysmocom.de>2020-05-28 09:53:22 +0000
commit118915fba76b6a3e826cc4cd6e47117f88653b41 (patch)
tree097c5459c73abd12167074e574be22882ea60a09
parent29d77413c0373e2e3c35f6a86e0f95d87f67401f (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"