From de474ba0395024e4149ae8be61097dec6b91cf07 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 2 Jun 2021 06:46:47 -0500 Subject: Fix "make tests" exiting on failure when test run in subshell. --- scripts/test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index daaeec07..a217ef0c 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -31,7 +31,8 @@ export LC_COLLATE=C do_test() { - cd "$TESTDIR" && rm -rf testdir && mkdir testdir && cd testdir || exit 1 + cd "$TESTDIR" && rm -rf testdir continue && mkdir testdir && cd testdir || + exit 1 CMDNAME="${1##*/}" CMDNAME="${CMDNAME%.test}" if [ -z "$TEST_HOST" ] @@ -44,7 +45,9 @@ do_test() fi C="$(dirname $(realpath "$C"))/$CMDNAME" - (. "$1") + (. "$1"; cd "$TESTDIR"; touch continue) + cd "$TESTDIR" + [ -e continue ] || exit 1 } if [ $# -ne 0 ] -- cgit v1.2.3