aboutsummaryrefslogtreecommitdiff
path: root/src/dns/test_gnunet_dns.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-17 22:25:52 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-17 22:25:52 +0000
commit9bce094f751c1e80a41c4ea509845205e8842845 (patch)
tree4a02e422c981ed9911f599c4bebc11b62c773de2 /src/dns/test_gnunet_dns.sh
parent11cbed2558f43f11a4329266ecfb46bf916c5a4a (diff)
downloadgnunet-9bce094f751c1e80a41c4ea509845205e8842845.tar.gz
gnunet-9bce094f751c1e80a41c4ea509845205e8842845.zip
-adding testcase
Diffstat (limited to 'src/dns/test_gnunet_dns.sh')
-rwxr-xr-xsrc/dns/test_gnunet_dns.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/dns/test_gnunet_dns.sh b/src/dns/test_gnunet_dns.sh
new file mode 100755
index 000000000..35585d46e
--- /dev/null
+++ b/src/dns/test_gnunet_dns.sh
@@ -0,0 +1,18 @@
1#!/bin/bash
2
3ME=`whoami`
4if [ "$ME" != "root" ]
5then
6 echo "This test only works if run as root. Skipping."
7 exit 0
8fi
9export PATH=".:$PATH"
10gnunet-service-dns -c dns.conf &
11gnunet-dns-redirector -c dns.conf -4 127.0.0.1 &
12sleep 1
13LO=`nslookup gnunet.org | grep Address | tail -n1`
14if [ "$LO" != "Address: 127.0.0.1" ]
15then
16 echo "Fail: $LO"
17fi
18kill `jobs -p`