projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clean up zone iteration logic
[oweals/gnunet.git]
/
src
/
namestore
/
test_namestore_lookup.sh
diff --git
a/src/namestore/test_namestore_lookup.sh
b/src/namestore/test_namestore_lookup.sh
index 7a7e9e2c57869393e3179ebdca015433c8c58f72..90735b17e094fd0e67c624a9f98fa28807658f80 100755
(executable)
--- a/
src/namestore/test_namestore_lookup.sh
+++ b/
src/namestore/test_namestore_lookup.sh
@@
-1,23
+1,28
@@
#!/bin/bash
CONFIGURATION="test_namestore_api.conf"
trap "gnunet-arm -e -c $CONFIGURATION" SIGINT
#!/bin/bash
CONFIGURATION="test_namestore_api.conf"
trap "gnunet-arm -e -c $CONFIGURATION" SIGINT
-rm -rf `gnunet-config -c $CONFIGURATION -s PATHS -o SERVICEHOME`
-TEST_DOMAIN_PLUS="www.gnu"
-TEST_DOMAIN_DNS="www3.gnu"
+
+LOCATION=$(which gnunet-config)
+if [ -z $LOCATION ]
+then
+ 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
+
+rm -rf `$LOCATION -c $CONFIGURATION -s PATHS -o GNUNET_HOME`
TEST_IP_PLUS="127.0.0.1"
TEST_IP_PLUS="127.0.0.1"
-TEST_IP_DNS="131.159.74.67"
-TEST_RECORD_CNAME_SERVER="server"
-TEST_RECORD_CNAME_PLUS="server.+"
-TEST_RECORD_CNAME_DNS="gnunet.org"
-TEST_RECORD_NAME_SERVER="server"
-TEST_RECORD_NAME_PLUS="www"
TEST_RECORD_NAME_DNS="www3"
which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
function start_peer
{
gnunet-arm -s -c $CONFIGURATION
TEST_RECORD_NAME_DNS="www3"
which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
function start_peer
{
gnunet-arm -s -c $CONFIGURATION
- gnunet-identity -C testego -c $CONFIGURATION
+ gnunet-identity -C testego -c $CONFIGURATION
}
function stop_peer
}
function stop_peer
@@
-46,7
+51,7
@@
for LINE in $OUTPUT ;
if echo "$LINE" | grep -q "$TEST_IP_PLUS"; then
FOUND_IP=true;
#echo $FOUND_IP
if echo "$LINE" | grep -q "$TEST_IP_PLUS"; then
FOUND_IP=true;
#echo $FOUND_IP
- fi
+ fi
done
stop_peer
done
stop_peer