fix only cache variable long/short
[oweals/gnunet.git] / src / gns / test_gns_plus_lookup.sh
index 4ff23c3bcb56f80be5b6d071e7aac4f19e4e4ed7..a6a9e8da492c219d8d205e74110d98cd44fa072b 100755 (executable)
@@ -4,12 +4,17 @@ trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
 LOCATION=$(which gnunet-config)
 if [ -z $LOCATION ]
 then
-       echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" 
-       exit 1
+  LOCATION="gnunet-config"
+fi
+$LOCATION --version 1> /dev/null
+if test $? != 0
+then
+       echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
+       exit 77
 fi
 
 which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
-rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
+rm -rf /tmp/test-gnunet-gns-peer-1/
 
 TEST_IP="127.0.0.1"
 gnunet-arm -s -c test_gns_lookup.conf
@@ -22,6 +27,7 @@ RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u b.gnu -t A -c test_gns_lookup
 gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY  -e never -c test_gns_lookup.conf
 gnunet-namestore -z delegatedego -d -n '+' -t A -V $TEST_IP  -e never -c test_gns_lookup.conf
 gnunet-arm -e -c test_gns_lookup.conf
+rm -rf /tmp/test-gnunet-gns-peer-1/
 
 if [ "$RES_IP" == "$TEST_IP" ]
 then