From c77018116cff4dbb9636f94ca54dffe75c5eaccb Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 26 Jun 2019 23:42:14 -0500 Subject: testcmd shouldn't use shell builtin for TEST_HOST unless there isn't one in $PATH. --- scripts/test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/test.sh b/scripts/test.sh index ea58f56f..d9955a5f 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -34,11 +34,13 @@ do_test() cd "$TESTDIR" && rm -rf testdir && mkdir testdir && cd testdir || exit 1 CMDNAME="${1##*/}" CMDNAME="${CMDNAME%.test}" - C="$CMDNAME" if [ -z "$TEST_HOST" ] then C="$TESTDIR/$CMDNAME" [ ! -e "$C" ] && echo "$CMDNAME disabled" && return + else + C="$(which $CMDNAME 2>/dev/null)" + [ -z "$C" ] && "C=$CMDNAME" fi . "$1" -- cgit v1.2.3