aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gnunet_gns.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_gnunet_gns.sh.in')
-rwxr-xr-xsrc/gns/test_gnunet_gns.sh.in50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/gns/test_gnunet_gns.sh.in b/src/gns/test_gnunet_gns.sh.in
deleted file mode 100755
index 8a96ff034..000000000
--- a/src/gns/test_gnunet_gns.sh.in
+++ /dev/null
@@ -1,50 +0,0 @@
1#!/bin/bash
2# This file is in the public domain.
3# test -z being correct was a false assumption here.
4# I have no executable 'fooble', but this will
5# return 1:
6# if test -z "`which fooble`"; then echo 1; fi
7# The command builtin might not work with busybox's ash
8# but this works for now.
9dir=$(dirname "$0")
10
11if test -e @PKGDATADIRECTORY@/existence.sh
12then
13 . @PKGDATADIRECTORY@/existence.sh
14else
15 . $dir/../../contrib/build-common/sh/lib.sh/existence.sh
16fi
17
18LOCATION=`existence gnunet-config`
19if test -z $LOCATION; then
20 LOCATION="gnunet-config"
21fi
22$LOCATION --version
23if test $? != 0
24then
25 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
26 exit 77
27fi
28
29trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
30ME=`whoami`
31if [ "$ME" != "root" ]
32then
33 echo "This test only works if run as root. Skipping."
34 exit 77
35fi
36export PATH=".:$PATH"
37gnunet-service-gns -c gns.conf &
38sleep 1
39LO=`nslookup alice.gnu | grep Address | tail -n1`
40if [ "$LO" != "Address: 1.2.3.4" ]
41then
42 echo "Fail: $LO"
43fi
44LO=`nslookup www.bob.gnu | grep Address | tail -n1`
45if [ "$LO" != "Address: 4.5.6.7" ]
46then
47 echo "Fail: $LO"
48fi
49# XXX: jobs. a builtin by bash, netbsd sh, maybe leave it be for now.
50kill `jobs -p`