diff options
author | Rob Landley <rob@landley.net> | 2019-06-26 23:42:14 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-06-26 23:42:14 -0500 |
commit | c77018116cff4dbb9636f94ca54dffe75c5eaccb (patch) | |
tree | a7dae00b68d4968729749d6533fff8be8c1b384f | |
parent | 40e55eb40afab3bc978fb42b6ec009a108d8e0c3 (diff) | |
download | toybox-c77018116cff4dbb9636f94ca54dffe75c5eaccb.tar.gz |
testcmd shouldn't use shell builtin for TEST_HOST unless there isn't
one in $PATH.
-rwxr-xr-x | scripts/test.sh | 4 |
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" |