]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Prefer tpkg from submodule
authorWillem Toorop <willem@nlnetlabs.nl>
Mon, 15 Jul 2019 12:14:46 +0000 (14:14 +0200)
committerWillem Toorop <willem@nlnetlabs.nl>
Mon, 15 Jul 2019 12:14:46 +0000 (14:14 +0200)
test/test_all.sh
test/test_ci.sh

index 5e2645bc6fef1eee69f7e2d802d314f42dedf0d2..59ad08c2e98a59fb51431154c68d83cb5e00fa69 100755 (executable)
@@ -4,14 +4,21 @@ cd test
 . common.sh
 
 # find tpkg
-if test -x "`which tpkg 2>&1`"; then
-       TPKG=tpkg
-else
-       TPKG=$1
-       if [ -z "$TPKG" ]
-       then
-       TPKG=$HOME/repos/tpkg/tpkg
-       fi
+
+if [ -z "$TPKG" -o ! -x "$TPKG" ]
+then
+        if [ -x tpkg/tpkg ]  ; then TPKG=`pwd`/tpkg/tpkg
+        elif [ -x test/tpkg/tpkg ]      ; then TPKG=`pwd`/test/tpkg/tpkg
+        elif which tpkg > /dev/null     ; then TPKG=`which tpkg`
+        else
+               TPKG=$1
+               if [ -z "$TPKG" ]
+               then
+                       TPKG=$HOME/repos/tpkg/tpkg
+                       echo Did not find tpkg program!
+                       exit -1
+               fi
+        fi
 fi
 
 test_tool_avail "dig"
index 21081a3d6d92c6b244940be38bec94e8d6c2ece3..c32279ba7e9820525c6e11933e45653453bf201b 100755 (executable)
@@ -19,12 +19,9 @@ fi
 
 if [ -z "$TPKG" -o ! -x "$TPKG" ]
 then
-        if which tpkg > /dev/null      ; then TPKG=`which tpkg`
-        elif [ -x $HOME/bin/tpkg ]     ; then TPKG=$HOME/bin/tpkg
-        elif [ -x $HOME/local/bin/tpkg ]; then TPKG=$HOME/local/bin/tpkg
-        elif [ -x /home/tpkg/bin/tpkg ]        ; then TPKG=/home/tpkg/bin/tpkg
-        elif [ -x ../tpkg/tpkg ]       ; then TPKG=../tpkg/tpkg
+        if [ -x tpkg/tpkg ]    ; then TPKG=`pwd`/tpkg/tpkg
         elif [ -x test/tpkg/tpkg ]     ; then TPKG=`pwd`/test/tpkg/tpkg
+        elif which tpkg > /dev/null    ; then TPKG=`which tpkg`
         else
                 echo Did not find tpkg program!
                 exit -1