diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-20 10:01:59 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-20 10:01:59 +0000 |
commit | 2a0a7698bf8a9eb1f3892f5ec347a1158bd58a4d (patch) | |
tree | 3a95084120d628bd03b19c048c53f053b49bce53 /src/gns/test_gns_gns2dns_lookup.sh | |
parent | b7aed3343c3e9f9179e7c49e73c21f2688fd7aa8 (diff) | |
download | gnunet-2a0a7698bf8a9eb1f3892f5ec347a1158bd58a4d.tar.gz gnunet-2a0a7698bf8a9eb1f3892f5ec347a1158bd58a4d.zip |
-check for 'timeout'
Diffstat (limited to 'src/gns/test_gns_gns2dns_lookup.sh')
-rwxr-xr-x | src/gns/test_gns_gns2dns_lookup.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gns/test_gns_gns2dns_lookup.sh b/src/gns/test_gns_gns2dns_lookup.sh index 829161e6c..a49a939c8 100755 --- a/src/gns/test_gns_gns2dns_lookup.sh +++ b/src/gns/test_gns_gns2dns_lookup.sh | |||
@@ -50,14 +50,16 @@ gnunet-namestore -p -z testego -a -n $TEST_RESOLVER_LABEL -t A -V $TEST_IP_GNS2D | |||
50 | # map 'homepage.gnu' to 'gnunet.org' in DNS | 50 | # map 'homepage.gnu' to 'gnunet.org' in DNS |
51 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS -e never -c test_gns_lookup.conf | 51 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS -e never -c test_gns_lookup.conf |
52 | 52 | ||
53 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | ||
54 | |||
53 | # lookup 'www.gnunet.org', IPv4 | 55 | # lookup 'www.gnunet.org', IPv4 |
54 | RES_IP=$(timeout 5 gnunet-gns --raw -z testego -u $TEST_DOMAIN -t A -c test_gns_lookup.conf) | 56 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_DOMAIN -t A -c test_gns_lookup.conf` |
55 | # lookup 'www.gnunet.org', IPv6 | 57 | # lookup 'www.gnunet.org', IPv6 |
56 | RES_IP6=$(timeout 5 gnunet-gns --raw -z testego -u $TEST_DOMAIN -t AAAA -c test_gns_lookup.conf) | 58 | RES_IP6=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_DOMAIN -t AAAA -c test_gns_lookup.conf` |
57 | # lookup 'gnunet.org', IPv4 | 59 | # lookup 'gnunet.org', IPv4 |
58 | RES_IP_ALT=$(timeout 5 gnunet-gns --raw -z testego -u $TEST_DOMAIN_ALT -t A -c test_gns_lookup.conf) | 60 | RES_IP_ALT=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_DOMAIN_ALT -t A -c test_gns_lookup.conf` |
59 | # lookup 'uk.gnunet.org', IPv4 | 61 | # lookup 'uk.gnunet.org', IPv4 |
60 | RES_IP_ALT2=$(timeout 5 gnunet-gns --raw -z testego -u $TEST_DOMAIN_ALT2 -t A -c test_gns_lookup.conf) | 62 | RES_IP_ALT2=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_DOMAIN_ALT2 -t A -c test_gns_lookup.conf` |
61 | 63 | ||
62 | # clean up | 64 | # clean up |
63 | gnunet-namestore -z testego -d -n $TEST_RESOLVER_LABEL -t A -V $TEST_IP_GNS2DNS -e never -c test_gns_lookup.conf | 65 | gnunet-namestore -z testego -d -n $TEST_RESOLVER_LABEL -t A -V $TEST_IP_GNS2DNS -e never -c test_gns_lookup.conf |