diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-17 22:25:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-17 22:25:52 +0000 |
commit | 9bce094f751c1e80a41c4ea509845205e8842845 (patch) | |
tree | 4a02e422c981ed9911f599c4bebc11b62c773de2 /src/dns/test_gnunet_dns.sh | |
parent | 11cbed2558f43f11a4329266ecfb46bf916c5a4a (diff) | |
download | gnunet-9bce094f751c1e80a41c4ea509845205e8842845.tar.gz gnunet-9bce094f751c1e80a41c4ea509845205e8842845.zip |
-adding testcase
Diffstat (limited to 'src/dns/test_gnunet_dns.sh')
-rwxr-xr-x | src/dns/test_gnunet_dns.sh | 18 |
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 | |||
3 | ME=`whoami` | ||
4 | if [ "$ME" != "root" ] | ||
5 | then | ||
6 | echo "This test only works if run as root. Skipping." | ||
7 | exit 0 | ||
8 | fi | ||
9 | export PATH=".:$PATH" | ||
10 | gnunet-service-dns -c dns.conf & | ||
11 | gnunet-dns-redirector -c dns.conf -4 127.0.0.1 & | ||
12 | sleep 1 | ||
13 | LO=`nslookup gnunet.org | grep Address | tail -n1` | ||
14 | if [ "$LO" != "Address: 127.0.0.1" ] | ||
15 | then | ||
16 | echo "Fail: $LO" | ||
17 | fi | ||
18 | kill `jobs -p` | ||