From e16f4bf49878c0a441ce2adea76b302521374203 Mon Sep 17 00:00:00 2001 From: RTXUX Date: Sun, 7 Apr 2024 16:21:50 +0000 Subject: [PATCH] testdrive: exit with non-zero code on timeout --- testdrive.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testdrive.sh b/testdrive.sh index 5a6e361ca..30eaee74a 100755 --- a/testdrive.sh +++ b/testdrive.sh @@ -3,7 +3,7 @@ SUFFIX="$RANDOM" cleanup() { - docker stop "gitlab-${SUFFIX}" || kill -TERM "$(jobs -p)" || true + docker stop "gitlab-${SUFFIX}" || kill -TERM "$(jobs -pr)" || true docker stop "gitlab-redis-${SUFFIX}" || true docker stop "gitlab-postgresql-${SUFFIX}" || true } @@ -55,6 +55,6 @@ RETRIES="48" RETRIED=0 WAIT_TIME="5s" -until check || [[ "$((RETRIED++))" == "${RETRIES}" ]]; do +until check || { [[ "$((RETRIED++))" == "${RETRIES}" ]] && exit 1; } ; do sleep "${WAIT_TIME}" done