diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2014-01-30 14:37:36 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2014-01-30 14:37:36 +0000 |
commit | e4e2c54e62f4eeba2aa2db33bd9cf75e45d99c0c (patch) | |
tree | 438187f13657fc6dc0931e2692e5f4c1adf6e795 | |
parent | 07600feaf31bf8f62ee407a6173d1ef2c19e4878 (diff) | |
download | gnunet-e4e2c54e62f4eeba2aa2db33bd9cf75e45d99c0c.tar.gz gnunet-e4e2c54e62f4eeba2aa2db33bd9cf75e45d99c0c.zip |
Skip testcase when DNS is not available
* gns/test_gns_cname_lookup.sh: Check if DNS resolution works and skip test if
it doesn't work.
-rwxr-xr-x | src/gns/test_gns_cname_lookup.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gns/test_gns_cname_lookup.sh b/src/gns/test_gns_cname_lookup.sh index f868bbae1..c06cd2133 100755 --- a/src/gns/test_gns_cname_lookup.sh +++ b/src/gns/test_gns_cname_lookup.sh | |||
@@ -13,6 +13,15 @@ then | |||
13 | exit 77 | 13 | exit 77 |
14 | fi | 14 | fi |
15 | 15 | ||
16 | # permissive DNS resolver we will use for the test | ||
17 | DNS_RESOLVER="8.8.8.8" | ||
18 | if ! nslookup gnunet.org $DNS_RESOLVER &> /dev/null | ||
19 | then | ||
20 | echo "Cannot reach DNS, skipping test" | ||
21 | exit 77 | ||
22 | fi | ||
23 | |||
24 | |||
16 | rm -rf /tmp/test-gnunet-gns-peer-1/ | 25 | rm -rf /tmp/test-gnunet-gns-peer-1/ |
17 | 26 | ||
18 | TEST_DOMAIN_PLUS="www.gnu" | 27 | TEST_DOMAIN_PLUS="www.gnu" |