More W32 resolver workarounds
[oweals/gnunet.git] / src / dns / test_gnunet_dns.sh
index c816801e98747827eda758165048a0fd8efa8272..4fa47bb6fcad05666a11124d90940f40e4523b42 100755 (executable)
@@ -9,13 +9,14 @@ fi
 if ! which sudo > /dev/null 
 then
   echo "This test requires sudo.  Skipping."
+  exit 0
 fi
 if [ ! -x `which sudo` ]
 then
   echo "This test requires sudo.  Skipping."
   exit 0
 fi
-if ! which nslookup
+if ! which nslookup > /dev/null
 then 
   echo "This test requires nslookup.  Skipping."
   exit 0
@@ -25,6 +26,12 @@ then
   echo "This test requires nslookup.  Skipping."
   exit 0
 fi
+if ! iptables -t mangle --list &> /dev/null
+then
+  echo "This test requires iptables with 'mangle' support. Skipping."
+  exit 0
+fi
+
 export PATH=".:$PATH"
 gnunet-service-dns -c dns.conf &
 gnunet-dns-redirector -c dns.conf -4 127.0.0.1 &
@@ -37,6 +44,7 @@ then
  echo "Fail: got address $LO, wanted 127.0.0.1"
  ret=1
 else
+ echo "Test run, with success."
  ret=0
 fi
 kill `jobs -p`