gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] 02/02: add logic to skip tests if DNS or /etc/host


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 02/02: add logic to skip tests if DNS or /etc/hosts does not like us
Date: Mon, 12 Nov 2018 21:25:15 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit 98288a7b26344294a3668101b9c2b502dfc19e12
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Nov 12 21:25:06 2018 +0100

    add logic to skip tests if DNS or /etc/hosts does not like us
---
 src/gns/test_gns_gns2dns_cname_lookup.sh |  9 ++++++++-
 src/gns/test_gns_gns2dns_lookup.sh       | 10 +++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/gns/test_gns_gns2dns_cname_lookup.sh 
b/src/gns/test_gns_gns2dns_cname_lookup.sh
index 84ad8549f..17196f820 100755
--- a/src/gns/test_gns_gns2dns_cname_lookup.sh
+++ b/src/gns/test_gns_gns2dns_cname_lookup.sh
@@ -43,7 +43,15 @@ MY_EGO="myego"
 # various names we will use for resolution
 TEST_DOMAIN="www.${TEST_RECORD_NAME}.$MY_EGO"
 
+which timeout &> /dev/null && DO_TIMEOUT="timeout 15"
+
+
 gnunet-arm -s -c test_gns_lookup.conf
+
+echo $OUT | grep $TEST_IP - > /dev/null || { gnunet-arm -e -c 
test_gns_lookup.conf ; echo "IPv4 for gnunet.org not found, skipping test"; 
exit 77; }
+echo $OUT | grep $TEST6_IP - > /dev/null || { gnunet-arm -e -c 
test_gns_lookup.conf ; echo "IPv6 for gnunet.org not found, skipping test"; 
exit 77; }
+
+
 gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
 
 # set IP address for DNS resolver for resolving in gnunet.org domain
@@ -52,7 +60,6 @@ gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t 
GNS2DNS -V $TEST_RECOR
 gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V 
$TEST_RECORD_GNS2DNS2 -e never -c test_gns_lookup.conf
 gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V 
$TEST_RECORD_GNS2DNS3 -e never -c test_gns_lookup.conf
 
-which timeout &> /dev/null && DO_TIMEOUT="timeout 15"
 
 echo "EGOs:"
 gnunet-identity -d
diff --git a/src/gns/test_gns_gns2dns_lookup.sh 
b/src/gns/test_gns_gns2dns_lookup.sh
index 122e45525..431f01086 100755
--- a/src/gns/test_gns_gns2dns_lookup.sh
+++ b/src/gns/test_gns_gns2dns_lookup.sh
@@ -44,8 +44,17 @@ TEST_DOMAIN="www.${TEST_RECORD_NAME}.$MY_EGO"
 TEST_DOMAIN_ALT="${TEST_RECORD_NAME}.$MY_EGO"
 TEST_DOMAIN_ALT2="docs.${TEST_RECORD_NAME}.$MY_EGO"
 
+which timeout &> /dev/null && DO_TIMEOUT="timeout 15"
+
 
 gnunet-arm -s -c test_gns_lookup.conf
+
+OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf gnunet.org`
+echo $OUT | grep $TEST_IP - > /dev/null || { gnunet-arm -e -c 
test_gns_lookup.conf ; echo "IPv4 for gnunet.org not found, skipping test"; 
exit 77; }
+echo $OUT | grep $TEST6_IP - > /dev/null || { gnunet-arm -e -c 
test_gns_lookup.conf ; echo "IPv6 for gnunet.org not found, skipping test"; 
exit 77; }
+
+
+
 gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
 
 # set IP address for DNS resolver for resolving in gnunet.org domain
@@ -53,7 +62,6 @@ gnunet-namestore -p -z $MY_EGO -a -n $TEST_RESOLVER_LABEL -t 
A -V $TEST_IP_GNS2D
 # map '$TEST_RECORD_NAME.$MY_EGO' to 'gnunet.org' in DNS
 gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V 
$TEST_RECORD_GNS2DNS -e never -c test_gns_lookup.conf
 
-which timeout &> /dev/null && DO_TIMEOUT="timeout 15"
 
 echo "EGOs:"
 gnunet-identity -d

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]