aboutsummaryrefslogtreecommitdiff
path: root/scripts/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/test.sh')
-rwxr-xr-xscripts/test.sh4
1 files changed, 3 insertions, 1 deletions
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"