aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-07-22 17:00:11 -0500
committerRob Landley <rob@landley.net>2017-07-22 17:00:11 -0500
commit6e2ef60264d99022ed2a435b09e1fcf4f6bac178 (patch)
tree1670289a0df9011a73ce0b6212bd38b08581a596 /scripts
parentda230831caf80a2bb781783d4289328cd1ab19ca (diff)
downloadtoybox-6e2ef60264d99022ed2a435b09e1fcf4f6bac178.tar.gz
testcmd should only use absolute path to command when not doing TEST_HOST.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/test.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/test.sh b/scripts/test.sh
index 01f9ea34..1e357173 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -30,7 +30,12 @@ do_test()
{
CMDNAME="${1##*/}"
CMDNAME="${CMDNAME%.test}"
- [ -z "$2" ] && C="$(readlink -f ../$CMDNAME)" || C="$(which $CMDNAME)"
+ if [ -z "$TEST_HOST" ]
+ then
+ [ -z "$2" ] && C="$(readlink -f ../$CMDNAME)" || C="$(which $CMDNAME)"
+ else
+ C="$CMDNAME"
+ fi
if [ ! -z "$C" ]
then
. "$1"