2 # This file is in the public domain.
4 out=`mktemp /tmp/test-gnunet-dht-logXXXXXXXX`
5 tempcfg=`mktemp /tmp/test-dht-tools.XXXXXXXX`
7 armexe="gnunet-arm -c $tempcfg "
8 putexe="gnunet-dht-put -c $tempcfg "
9 getexe="gnunet-dht-get -c $tempcfg "
10 peerinfo="gnunet-peerinfo -c $tempcfg -sq"
13 if ! $armexe $DEBUG -e -d > $out ; then
14 echo "FAIL: error running $armexe"
15 echo "Command output was:"
23 cp test_dht_tools.conf $tempcfg
25 echo -n "TEST: Starting ARM..."
26 if ! $armexe $DEBUG -s > $out ; then
27 echo "FAIL: error running $armexe"
28 echo "Command output was:"
35 echo -n "TEST: Testing put..."
36 if ! $putexe -k testkey -d testdata -t 8 > $out ; then
37 echo "FAIL: error running $putexe"
38 echo "Command output was:"
45 echo -n "TEST: Testing get..."
46 echo "Result 0, type 8:" > $checkout
47 echo "testdata" >> $checkout
49 if ! $getexe -k testkey -T 100ms -t 8 > $out ; then
50 echo "FAIL: error running $putexe"
51 echo "Command output was:"
57 if ! diff --strip-trailing-cr -q $out $checkout ; then
58 echo "FAIL: $out and $checkout differ:"
59 diff --strip-trailing-cr $out $checkout