]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Convert tdir tests to use the new skip_test functionality.
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Tue, 20 Sep 2022 12:45:20 +0000 (14:45 +0200)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Tue, 20 Sep 2022 12:45:20 +0000 (14:45 +0200)
87 files changed:
doc/Changelog
testcode/mini_tdir.sh
testdata/07-confroot.tdir/07-confroot.dsc
testdata/07-confroot.tdir/07-confroot.pre [new file with mode: 0644]
testdata/07-confroot.tdir/07-confroot.test
testdata/08-host-lib.tdir/08-host-lib.pre
testdata/08-host-lib.tdir/08-host-lib.test
testdata/clang-analysis.tdir/clang-analysis.dsc
testdata/clang-analysis.tdir/clang-analysis.pre [new file with mode: 0644]
testdata/clang-analysis.tdir/clang-analysis.test
testdata/dnscrypt_cert.tdir/dnscrypt_cert.post
testdata/dnscrypt_cert.tdir/dnscrypt_cert.pre
testdata/dnscrypt_cert.tdir/dnscrypt_cert.test
testdata/dnscrypt_cert.tdir/precheck.sh [deleted file]
testdata/dnscrypt_cert_chacha.tdir/dnscrypt_cert_chacha.post
testdata/dnscrypt_cert_chacha.tdir/dnscrypt_cert_chacha.pre
testdata/dnscrypt_cert_chacha.tdir/dnscrypt_cert_chacha.test
testdata/dnscrypt_cert_chacha.tdir/precheck.sh [deleted file]
testdata/dnstap.tdir/dnstap.post
testdata/dnstap.tdir/dnstap.pre
testdata/dnstap.tdir/dnstap.test
testdata/dnstap_reconnect.tdir/dnstap_reconnect.post
testdata/dnstap_reconnect.tdir/dnstap_reconnect.pre
testdata/dnstap_reconnect.tdir/dnstap_reconnect.test
testdata/dnstap_tcp.tdir/dnstap_tcp.post
testdata/dnstap_tcp.tdir/dnstap_tcp.pre
testdata/dnstap_tcp.tdir/dnstap_tcp.test
testdata/dnstap_tls.tdir/dnstap_tls.post
testdata/dnstap_tls.tdir/dnstap_tls.pre
testdata/dnstap_tls.tdir/dnstap_tls.test
testdata/dnstap_tls_badcert.tdir/dnstap_tls_badcert.post
testdata/dnstap_tls_badcert.tdir/dnstap_tls_badcert.pre
testdata/dnstap_tls_badcert.tdir/dnstap_tls_badcert.test
testdata/dnstap_tls_badname.tdir/dnstap_tls_badname.post
testdata/dnstap_tls_badname.tdir/dnstap_tls_badname.pre
testdata/dnstap_tls_badname.tdir/dnstap_tls_badname.test
testdata/dnstap_tls_clientauth.tdir/dnstap_tls_clientauth.post
testdata/dnstap_tls_clientauth.tdir/dnstap_tls_clientauth.pre
testdata/dnstap_tls_clientauth.tdir/dnstap_tls_clientauth.test
testdata/dnstap_tls_peername.tdir/dnstap_tls_peername.post
testdata/dnstap_tls_peername.tdir/dnstap_tls_peername.pre
testdata/dnstap_tls_peername.tdir/dnstap_tls_peername.test
testdata/doh_downstream.tdir/doh_downstream.post
testdata/doh_downstream.tdir/doh_downstream.pre
testdata/doh_downstream.tdir/doh_downstream.test
testdata/doh_downstream_buffer_size.tdir/doh_downstream_buffer_size.post
testdata/doh_downstream_buffer_size.tdir/doh_downstream_buffer_size.pre
testdata/doh_downstream_buffer_size.tdir/doh_downstream_buffer_size.test
testdata/doh_downstream_endpoint.tdir/doh_downstream_endpoint.post
testdata/doh_downstream_endpoint.tdir/doh_downstream_endpoint.pre
testdata/doh_downstream_endpoint.tdir/doh_downstream_endpoint.test
testdata/doh_downstream_notls.tdir/doh_downstream_notls.post
testdata/doh_downstream_notls.tdir/doh_downstream_notls.pre
testdata/doh_downstream_notls.tdir/doh_downstream_notls.test
testdata/doh_downstream_post.tdir/doh_downstream_post.post
testdata/doh_downstream_post.tdir/doh_downstream_post.pre
testdata/doh_downstream_post.tdir/doh_downstream_post.test
testdata/dynlibmod.tdir/dynlibmod.post
testdata/dynlibmod.tdir/dynlibmod.pre
testdata/dynlibmod.tdir/dynlibmod.test
testdata/fwd_ancil.tdir/fwd_ancil.post
testdata/fwd_ancil.tdir/fwd_ancil.pre
testdata/fwd_ancil.tdir/fwd_ancil.test
testdata/ipset.tdir/ipset.post
testdata/ipset.tdir/ipset.pre
testdata/ipset.tdir/ipset.test
testdata/nss_compile.tdir/nss_compile.dsc
testdata/nss_compile.tdir/nss_compile.pre [new file with mode: 0644]
testdata/nss_compile.tdir/nss_compile.test
testdata/padding.tdir/padding.post
testdata/padding.tdir/padding.pre
testdata/padding.tdir/padding.test
testdata/pylib.tdir/pylib.post
testdata/pylib.tdir/pylib.pre
testdata/pylib.tdir/pylib.test
testdata/pymod.tdir/pymod.post
testdata/pymod.tdir/pymod.pre
testdata/pymod.tdir/pymod.test
testdata/pymod_thread.tdir/pymod_thread.post
testdata/pymod_thread.tdir/pymod_thread.pre
testdata/pymod_thread.tdir/pymod_thread.test
testdata/root_anchor.tdir/root_anchor.dsc
testdata/root_anchor.tdir/root_anchor.pre [new file with mode: 0644]
testdata/root_anchor.tdir/root_anchor.test
testdata/root_hints.tdir/root_hints.dsc
testdata/root_hints.tdir/root_hints.pre [new file with mode: 0644]
testdata/root_hints.tdir/root_hints.test

index a68d8d62528b5b6281f97863ad3b6040581d9790..7f330d8dd203ab2907dee7e94833f7c02a4f317d 100644 (file)
@@ -1,3 +1,6 @@
+20 September 2022: George
+       - Convert tdir tests to use the new skip_test functionality.
+
 16 September 2022: George
        - Merge #753: ACL per interface. (New interface-* configuration
          options).
index 46a930f41b0b320a0df791c78489908c12771cef..55c24c107927a0af6553dc6e0c568ca710ec02d0 100755 (executable)
@@ -55,14 +55,14 @@ if test "$1" = "-f" && test "$2" = "report"; then
                                pass=`expr $pass + 1`
                        fi
                elif test -f ".skip-$name"; then
-                       echo ">> SKIPPED<< $timelen $name: $desc"
+                       echo ".. SKIPPED.. $timelen $name: $desc"
                        skip=`expr $pass + 1`
                else
                        if test -f "result.$name"; then
                                echo "!! FAILED !! $timelen $name: $desc"
                                fail=`expr $fail + 1`
                        else
-                               echo ">> SKIPPED<< $timelen $name: $desc"
+                               echo ".. SKIPPED.. $timelen $name: $desc"
                                skip=`expr $skip + 1`
                        fi
                fi
@@ -86,13 +86,13 @@ if test "$1" = "report" || test "$2" = "report"; then
                        fi
                elif test -f ".skip-$name"; then
                        if test $quiet = 0; then
-                               echo ">> SKIPPED<< : $name"
+                               echo ".. SKIPPED.. : $name"
                        fi
                else
                        if test -f "result.$name"; then
                                echo "!! FAILED !! : $name"
                        else
-                               echo ">> SKIPPED<< : $name"
+                               echo ".. SKIPPED.. : $name"
                        fi
                fi
        done
index f1cbe6e7da2e6f386d22ef994461c582fa46aca4..a2530170982564c3ee49a9559a52d97f58cd692b 100644 (file)
@@ -8,7 +8,7 @@ Component:
 CmdDepends: 
 Depends: 
 Help:
-Pre:
+Pre: 07-confroot.pre
 Post:
 Test: 07-confroot.test
 AuxFiles: 
diff --git a/testdata/07-confroot.tdir/07-confroot.pre b/testdata/07-confroot.tdir/07-confroot.pre
new file mode 100644 (file)
index 0000000..4f966bd
--- /dev/null
@@ -0,0 +1,13 @@
+# #-- 07-confroot.pre --#
+# source the master var file when it's there
+[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
+# use .tpkg.var.test for in test variable passing
+[ -f .tpkg.var.test ] && source .tpkg.var.test
+
+PRE="../.."
+
+if uname | grep "MINGW" >/dev/null; then
+       # no chroot, no need to test.
+       # (test fails on / and \ comparisons, by the way).
+       skip_test "no chroot on windows, end test"
+fi
index d940aa873d8374c1cdf952fd8fe7754a0e56637e..9572330f72b70e4c3e17b395385da0255144cd08 100644 (file)
@@ -6,13 +6,6 @@
 
 PRE="../.."
 
-if uname | grep "MINGW" >/dev/null; then
-       # no chroot, no need to test.
-       # (test fails on / en \ comparisons, by the way).
-       echo "no chroot on windows, end test"
-       exit 0
-fi
-
 # create config file
 cwd=`pwd -P`
 subdir=$cwd/subdir
index 84817891ff933de30de9c1a22128b209d369d7ff..481b0ef2c2ebad80981102070a3f2b08e760913a 100644 (file)
@@ -4,7 +4,16 @@
 # use .tpkg.var.test for in test variable passing
 [ -f .tpkg.var.test ] && source .tpkg.var.test
 
+PRE="../.."
 . ../common.sh
+
+if grep FORK $PRE/config.h | grep "define" >/dev/null 2>&1; then
+       # nothing
+       :
+else
+       skip_test "forking is not available; test skipped."
+fi
+
 get_random_port 2
 FWD_PORT=$(($RND_PORT + 1))
 echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
index 8de8977762097b1d180f7b8da6d9eb6614ea8dfe..18603294e8845ce1a26b8b46204e3f72c3ee88c0 100644 (file)
@@ -7,14 +7,6 @@
 PRE="../.."
 . ../common.sh
 
-if grep FORK $PRE/config.h | grep "define" >/dev/null 2>&1; then
-       # nothing
-       :
-else
-       echo "forking is not available; test skipped."
-       exit 0
-fi
-
 # test if fwder is up
 echo "> dig @127.0.0.1 -p $FWD_PORT www.example.com | tee outfile"
 dig @127.0.0.1 -p $FWD_PORT www.example.com | tee outfile
index 20a62a3e314c9208608513fdb80cf183a0f165ca..b3a0609e3f1f3db6db05b1a923ba3002fe8a63e8 100644 (file)
@@ -7,7 +7,7 @@ Category:
 Component:
 Depends:
 Help:
-Pre:
+Pre: clang-analysis.pre
 Post:
 Test: clang-analysis.test
 AuxFiles:
diff --git a/testdata/clang-analysis.tdir/clang-analysis.pre b/testdata/clang-analysis.tdir/clang-analysis.pre
new file mode 100644 (file)
index 0000000..e9b9a26
--- /dev/null
@@ -0,0 +1,21 @@
+# #-- clang-analysis.pre --#
+# source the master var file when it's there
+[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
+# use .tpkg.var.test for in test variable passing
+[ -f .tpkg.var.test ] && source .tpkg.var.test
+# common functions
+. ../common.sh
+
+PRE="../.."
+if test ! -x "`which clang 2>&1`"; then
+       skip_test "No clang in path"
+fi
+#echo "have clang"
+# test if assertions are enabled
+if grep "^#define UNBOUND_DEBUG" $PRE/config.h >/dev/null; then
+       :
+else
+       skip_test "UNBOUND_DEBUG is not enabled, skip test"
+       # no unbound debug means no assertions, and clang analyzer uses
+       # the assertions to make inferences.
+fi
index 09c935860c47107ca4239ac340931cecf713fbfc..388556a4484871d58aa6c93a4d6093061e5effad 100644 (file)
@@ -7,20 +7,6 @@
 . ../common.sh
 
 PRE="../.."
-if test ! -x "`which clang 2>&1`"; then
-       echo "No clang in path"
-       exit 0
-fi
-#echo "have clang"
-# test if assertions are enabled
-if grep "^#define UNBOUND_DEBUG" $PRE/config.h >/dev/null; then
-       :
-else
-       echo "UNBOUND_DEBUG is not enabled, skip test"
-       # no unbound debug means no assertions, and clang analyzer uses
-       # the assertions to make inferences.
-       exit 0
-fi
 
 # read value from Makefile
 # $1: result variable name
index 0346d3f84a61826975c39ec367224556c81c0f4e..fcb6c9d0e08984d3766fffc704b4dc4751ca57cc 100644 (file)
@@ -8,9 +8,6 @@
 PRE="../.."
 . ../common.sh
 
-# Check if we can run the test.
-. ./precheck.sh
-
 kill_pid $FWD_PID
 kill_pid $UNBOUND_PID
 
index bee9e8ac63cac7f963e29653e848fd1f9381f3a9..6cf52299c5addb0cf4d8e46b1fbec83e701a7f47 100644 (file)
@@ -8,7 +8,11 @@ PRE="../.."
 . ../common.sh
 
 # Check if we can run the test.
-. ./precheck.sh
+if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
+        echo "have dnscrypt"
+else
+        skip_test "no dnscrypt"
+fi
 
 get_random_port 3
 UNBOUND_PORT=$RND_PORT
index f097537926962db15a5577df046e1792298d6138..fdb88e8f949040a29707227cf1b028077566dac0 100644 (file)
@@ -7,9 +7,6 @@
 PRE="../.."
 . ../common.sh
 
-# Check if we can run the test.
-. ./precheck.sh
-
 # do the test
 
 # Query plain request over DNSCrypt channel get closed
diff --git a/testdata/dnscrypt_cert.tdir/precheck.sh b/testdata/dnscrypt_cert.tdir/precheck.sh
deleted file mode 100644 (file)
index 00fa4bc..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# dnscrypt precheck.sh
-
-# if no dnscrypt; exit
-if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
-        echo "have dnscrypt"
-else
-        echo "no dnscrypt"
-        exit 0
-fi
-
-# if no xchacha20 support in unbound; exit
-if grep "define USE_DNSCRYPT_XCHACHA20 1" $PRE/config.h; then
-        xchacha20=1
-else
-        xchacha20=0
-fi
index 54337df67d55a8b1a747ebba5caee0d5defd89db..9537d9e821a4ecd6d26786ab34cecd809f920832 100644 (file)
@@ -8,10 +8,5 @@
 PRE="../.."
 . ../common.sh
 
-# Check if we can run the test.
-. ./precheck.sh
-
 kill_pid $FWD_PID
-if [ $xchacha20 -ne 0 ]; then
-    kill_pid $UNBOUND_PID
-fi
+kill_pid $UNBOUND_PID
index c77290a8ab7d247c4750fcc3eeca3b2c7d30b86b..4534fdf47f630190a0d07f672cf48b9d9a0c7593 100644 (file)
@@ -7,8 +7,17 @@
 PRE="../.."
 . ../common.sh
 
-# Check if we can run the test.
-. ./precheck.sh
+# if no dnscrypt; exit
+if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
+        echo "have dnscrypt"
+else
+        skip_test "no dnscrypt"
+fi
+if grep "define USE_DNSCRYPT_XCHACHA20 1" $PRE/config.h; then
+        echo "have XChacha20 support"
+else
+        skip_test "no XChacha20 support"
+fi
 
 get_random_port 3
 UNBOUND_PORT=$RND_PORT
@@ -34,10 +43,5 @@ echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
 
 cat .tpkg.var.test
 wait_ldns_testns_up fwd.log
-if [ $xchacha20 -eq 0 ]; then
-    # no xchacha20 support, we expect unbound to exit with an error message.
-    wait_server_up unbound.log "Certificate for XChacha20 but libsodium does not support it"
-else
-    wait_unbound_up unbound.log
-fi
+wait_unbound_up unbound.log
 
index 4ef6942be6fbaa2a04b6ff5a8b48ec41618e0140..2db073ad6a40ce38a869eba50096bf9b502e1610 100644 (file)
@@ -6,17 +6,9 @@
 
 PRE="../.."
 . ../common.sh
-# Check if we can run the test.
-. ./precheck.sh
 
 # do the test
 
-if [ $xchacha20 -eq 0 ]; then
-    # Unbound would exit before we can attempt any tests.
-    echo "OK"
-    exit 0
-fi
-
 # Query plain request over DNSCrypt channel get closed
 # We use TCP to avoid hanging on waiting for UDP.
 # We expect `outfile` to contain no DNS payload
@@ -104,7 +96,7 @@ do
     echo "> check answer"
     grep -F 'DNSC\000\002\000\000\1716\226\255*\244\002L\177g\025_\127tR\151\246R\203\178\153\248\006\137\"\138\173|G/,\160\152\015\010\172\184\220`\175\217\255,\162\018\178-d\007\246k0\003I[\205w\026)\204B\002\161\010\245\243W\191\189Z\216\210x\025\204\247\173\227t\138\018\162~\152\253\211\031z\\\002m5\008\254\2244\246\243W\191\189Z\216\210Y\160\2158Y\160\2158u\210\219\184' outfile
     cert_found=$?
-    if [ \( $cert_found -eq 0 -a $xchacha20 -eq 1 \)  -o \( $cert_found -ne 0 -a $xchacha20 -eq 0 \) ]; then
+    if [ \( $cert_found -eq 0 \) ]; then
         echo "OK"
     else
         echo "Not OK"
diff --git a/testdata/dnscrypt_cert_chacha.tdir/precheck.sh b/testdata/dnscrypt_cert_chacha.tdir/precheck.sh
deleted file mode 100644 (file)
index 00fa4bc..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# dnscrypt precheck.sh
-
-# if no dnscrypt; exit
-if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
-        echo "have dnscrypt"
-else
-        echo "no dnscrypt"
-        exit 0
-fi
-
-# if no xchacha20 support in unbound; exit
-if grep "define USE_DNSCRYPT_XCHACHA20 1" $PRE/config.h; then
-        xchacha20=1
-else
-        xchacha20=0
-fi
index 6744b4b618ce5b6fe5a682c8f62f7dbc58f8f4da..6d5e9d50d044390961a25e7d1eb0a5526121acaf 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $DNSTAP_SOCKET_PID
 kill_pid $FWD_PID
 kill $UNBOUND_PID
index 6561d77e98a2289094c17323ac85132581120717..0f2e0231df58731b0809f8c46cd9a7b0e00c0aeb 100644 (file)
@@ -7,7 +7,7 @@
 . ../common.sh
 
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 3
 UNBOUND_PORT=$RND_PORT
index fbf8565ffcacc9ed7468b2be5b4bb617d7131445..3a2dcc5e13f0bbd6ed1fbf479c2f637e85ab3481 100644 (file)
@@ -6,7 +6,6 @@
 
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 # test if the server is up.
 echo "> dig www.example.com."
index 0056a20d9506581f42d36144b2805e42c6da72ca..44b8e6b9722bc0b10e1c769302f9234f61e7faa0 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $DNSTAP_SOCKET_PID
 kill_pid $FWD_PID
 kill $UNBOUND_PID
index a1aba4f35c5d826e42a52d90be563bb40288325f..df031ac0138b7992762a7196093956e8dc4a07fc 100644 (file)
@@ -7,7 +7,7 @@
 . ../common.sh
 
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 3
 UNBOUND_PORT=$RND_PORT
index 94679bc66e7830c82f7fc22259fc53f1a3eb2385..8f28bc1094b656ae2e4f4c52db7dd4aff2923b50 100644 (file)
@@ -6,7 +6,6 @@
 
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 # test if the server is up.
 echo "> dig www.example.com."
index 8aad21e19b6a0586a85c7420fe23b9bafabda507..f9a52edf6b802bbfc3e82e3b74f3cbc6ed56fe99 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $DNSTAP_SOCKET_PID
 kill_pid $FWD_PID
 kill $UNBOUND_PID
index 3006603c564895339bd2cec597f9f305d21ca577..aea781de95c763707f53bd62cc7d19a04d307c75 100644 (file)
@@ -7,7 +7,7 @@
 . ../common.sh
 
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 4
 UNBOUND_PORT=$RND_PORT
index d57eecfdbb94e9272eb0b830bf5462c092cec60a..c9aef3e78e97c3b5d7b1690a04c26e44c550eef5 100644 (file)
@@ -6,7 +6,6 @@
 
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 # test if the server is up.
 echo "> dig www.example.com."
index fe1824a063d8b9104dbc9aaf71aff2ad0484b6d6..8adfb1a024ddcb4e746e4853772d423d98e33f69 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $DNSTAP_SOCKET_PID
 kill_pid $FWD_PID
 kill $UNBOUND_PID
index 1df9148735419bb440f4a7d38eb348239f62ae27..7a20ec2dd4ba2080f9f51c30f7a0ebce54aa610e 100644 (file)
@@ -7,7 +7,7 @@
 . ../common.sh
 
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 4
 UNBOUND_PORT=$RND_PORT
index f9a2bf00d7fdc690cc6744614b5b5ebdb07c8e0c..3a0bf10f09f7875fc83dffe6f1b9a14fff2b85ff 100644 (file)
@@ -6,7 +6,6 @@
 
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 # test if the server is up.
 echo "> dig www.example.com."
index d71eb28ae113d6a418dc8f2e7d81ed5f27c79564..aa0dfbfa4994626b3f2f9c156b18fd1e54aeed73 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $DNSTAP_SOCKET_PID
 kill_pid $FWD_PID
 kill $UNBOUND_PID
index eff7074d0b1e1ae639c124bad1dcb1ce091bdb94..f077965e0c9e9c434d36d4e0a49a3b53b1fb302c 100644 (file)
@@ -7,7 +7,7 @@
 . ../common.sh
 
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 4
 UNBOUND_PORT=$RND_PORT
index 0b85f64accbc3f010edbccd9bc3bbb0900a4867b..b4d944a0f9ad70369c2b25f4f75b007b28812878 100644 (file)
@@ -6,7 +6,6 @@
 
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 # test if the server is up.
 echo "> dig www.example.com."
index 59f05b81d93694af0ff699564218a29554fb33c9..553aa2f873d7c0cb480b967ffa7d1929a7845bae 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $DNSTAP_SOCKET_PID
 kill_pid $FWD_PID
 kill $UNBOUND_PID
index 0ffee6081619c002df595f813f27a34c8c5aa009..6a4a480b6385c73ea0af62b22058db40137b35ff 100644 (file)
@@ -7,7 +7,7 @@
 . ../common.sh
 
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 4
 UNBOUND_PORT=$RND_PORT
index 248d8f222531369074ae103e5435b6e3935b89fb..907392f6d580e17ded77d35b6be291e5fac9f3cb 100644 (file)
@@ -6,7 +6,6 @@
 
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 # test if the server is up.
 echo "> dig www.example.com."
index 83df2a72ec79b3a9823a09b2eb4e1180b274c16a..2ef2ac36f99a94e1e23ae7dc7da5bb9a14f203c3 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $DNSTAP_SOCKET_PID
 kill_pid $FWD_PID
 kill $UNBOUND_PID
index a035181cec0fa0c7d992bca3170a7d7fe2e06cf4..80a5cd61b6ebd6f9d3214406edf92009864d388a 100644 (file)
@@ -7,7 +7,7 @@
 . ../common.sh
 
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 4
 UNBOUND_PORT=$RND_PORT
index 5b9cce0a4c47cb9adc3c83d83716f3fe2475d0b0..842c8190ee943a071b9beabb2476ee02ac347e3f 100644 (file)
@@ -6,7 +6,6 @@
 
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 # test if the server is up.
 echo "> dig www.example.com."
index 3ca63ada4ee3e4fc6e3bb6987fa51563e82d1390..733a36ea91d00a67a980eeeac46177759d8776c3 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $DNSTAP_SOCKET_PID
 kill_pid $FWD_PID
 kill $UNBOUND_PID
index 25b838d8bfb0343eb4e0c9b7832dc99e35dc4cf0..50f9853d48333a15971d7f8be1782a59c04651d1 100644 (file)
@@ -7,7 +7,7 @@
 . ../common.sh
 
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 4
 UNBOUND_PORT=$RND_PORT
index 03bcbadfd093a771eb4d5adf3af863d99b8e9036..b5a6adfc322690fcc1975add91c9cbf4724f49b8 100644 (file)
@@ -6,7 +6,6 @@
 
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 # test if the server is up.
 echo "> dig www.example.com."
index 0e3c00b05531de38b44f89364dccef256165e84a..67972a7f0c454575c13af26bd2c69e8762a3e32d 100644 (file)
@@ -6,7 +6,6 @@
 #
 # do your teardown here
 PRE="../.."
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 . ../common.sh
 kill_pid $FWD_PID
 kill_pid $UNBOUND_PID
index 29bb805a16cc66aec6af8c52ed4cae60fe196859..22072544042b45dfe1d37d1ed8ae6b5e7751cb83 100644 (file)
@@ -6,7 +6,7 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 2
 UNBOUND_PORT=$RND_PORT
index d66168fbaab53c8ea2a38943db273b7415fbcef5..78e2e84eb3c4b44ff5436548c0d5847c7087febc 100644 (file)
@@ -6,7 +6,6 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 get_make
 (cd $PRE; $MAKE dohclient)
 
index 881970a77c0cd88e285dc52171463693c3ca40d6..f15ebe555a2c71dc0c917408f5521022d9dffa73 100644 (file)
@@ -6,7 +6,6 @@
 #
 # do your teardown here
 PRE="../.."
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 . ../common.sh
 kill_pid $UNBOUND_PID
 cat unbound.log
index a58780ab315a6b1f9630dc330f31561a5bd1aa12..ff68a46777f16c0db1b617b1ed2795ab3a0b2f67 100644 (file)
@@ -6,7 +6,7 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 1
 UNBOUND_PORT=$RND_PORT
index 78c46081d39b71f6d949891f28580c920b0eef6c..bbeb9eb2b65faf6b72cada075e24e4548c46d8ee 100644 (file)
@@ -6,7 +6,6 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 get_make
 (cd $PRE; $MAKE dohclient)
 
index dcdf8627e076eb4e656ba2d8d7cf78f6ef29f08d..f15ebe555a2c71dc0c917408f5521022d9dffa73 100644 (file)
@@ -7,6 +7,5 @@
 # do your teardown here
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $UNBOUND_PID
 cat unbound.log
index cd0d11fd4b3d901cf3786704e299ec0143433839..dd7acc290da357fd2b93acb5f7323cdf833d1716 100644 (file)
@@ -6,7 +6,7 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 get_random_port 1
 UNBOUND_PORT=$RND_PORT
 echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
index 2a6954cab6457bc75c6d333fedd4057876ee38b7..d788e366700c82191877870fd1540dd05655f246 100644 (file)
@@ -6,7 +6,6 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 get_make
 (cd $PRE; $MAKE dohclient)
 
index 3ceaeade8f8ddd364e9f95ede40d7c76eae29cd7..9fb51b6d343a18ff9e228ab2b160cd975bcaf637 100644 (file)
@@ -6,7 +6,6 @@
 #
 # do your teardown here
 PRE="../.."
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 . ../common.sh
 kill_pid $FWD_PID
 kill_pid $UNBOUND_PID
index e1f30a575a81e37ca400c9c2e54186e2e69a87c3..9c7233d649068dc2c04955cd4b0a892757d2dded 100644 (file)
@@ -6,7 +6,7 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 2
 UNBOUND_PORT=$RND_PORT
index 87ff560d3eae18bfdcd911af3bb0a198f127bf34..040285e8fd3a8686eba4e567231fc507317daedb 100644 (file)
@@ -6,7 +6,6 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 get_make
 (cd $PRE; $MAKE dohclient)
 
index 98034a32c439364d704065a667509c2578bbf0aa..2f8f5a8e0be87de6ad5754000ebc93ae135a547c 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $FWD_PID
 kill_pid $UNBOUND_PID
 cat unbound.log
index 34df83d4b4d25ed826c040b7cab94fb7d25742f1..a8ecd344b2db39a9bc00fc56a8d0d1fa4f372a09 100644 (file)
@@ -6,7 +6,7 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 get_random_port 2
 UNBOUND_PORT=$RND_PORT
 FWD_PORT=$(($RND_PORT + 1))
index 6442d1e1275192d3aa67233392e81ea1a7f03cba..d6a512ae324e8494a7cda830242eb1df91f2ee31 100644 (file)
@@ -6,7 +6,6 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 get_make
 (cd $PRE; $MAKE dohclient)
 
index caa0da4f51616efc7192181a4c7da6e44bf5502c..99a4268a7cf4fda78b3b0f3247329f0e6f9d0748 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $FWD_PID
 kill $UNBOUND_PID
 kill $UNBOUND_PID >/dev/null 2>&1
index 94adaa72332d909c47c4bead4430b19ba8130299..fbf229b8b10cf2f6c778360cb5a087cf2a4e9a43 100644 (file)
@@ -7,7 +7,7 @@
 . ../common.sh
 
 PRE="../.."
-if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 3
 UNBOUND_PORT=$RND_PORT
index f99f6fbc4e8b4a66eda0f6e067f9fdd074493d32..2954acaff4f894d3e3546299dac8368c905aa0c1 100644 (file)
@@ -6,7 +6,6 @@
 
 . ../common.sh
 PRE="../.."
-if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 # compile the dynamic library module
 if grep "define USE_WINSOCK 1" $PRE/config.h; then
index 6578151af73785f64dd8cc2be6dfbedd2956fcbc..c11bd44cd8a06205fe6fc45a48ad8a91bbb01e66 100644 (file)
@@ -6,11 +6,6 @@
 #
 # do your teardown here
 . ../common.sh
-if test `hostname`"" = "dicht.nlnetlabs.nl"; then
-       echo "In jail, no ::1, skip test"
-       exit 0
-fi
-
 kill_pid $FWD_PID
 if fgrep "service stopped" unbound.log; then
        exit 0
index e1ce37a7fcca11e214b59e1f0621a33c826eaec8..6c0fb7a0b23486f8370a0b3873239c2f72795e82 100644 (file)
@@ -6,8 +6,7 @@
 . ../common.sh
 
 if test `hostname`"" = "dicht.nlnetlabs.nl"; then
-       echo "In jail, no ::1, skip test"
-       exit 0
+       skip_test "In jail, no ::1, skip test"
 fi
 
 get_random_port 2
@@ -38,7 +37,6 @@ wait_ldns_testns_up fwd.log
 # string 'Start of service' in log.
 wait_server_up_or_fail unbound.log "start of service" "disable interface-automatic"
 if fgrep "disable interface-automatic" unbound.log; then
-       echo "skip test"
-       exit 1
+       skip_test "skip test"
 fi
 
index b90360fb8b4d700d235bffdd1db2d682dc2c1759..8da4754ce0ac5549bbf800e0a86fd20677379c04 100644 (file)
@@ -7,11 +7,6 @@
 PRE="../.."
 . ../common.sh
 
-if test `hostname`"" = "dicht.nlnetlabs.nl"; then
-       echo "In jail, no ::1, skip test"
-       exit 0
-fi
-
 if fgrep "disable interface-automatic" unbound.log; then
        echo "skip test"
        exit 0
index 7af512a4d3743a72aa5418be20e59608795da66c..4c4c17b130293389210e9ce4381e938a6e7ebb2c 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $FWD_PID
 kill_pid $UNBOUND_PID
 cat unbound.log
index ee1aedc70937ad7a50de5bb29b8d286e3c3b9ab3..42c94fac45e06c92dc3404f04b318091b071dc79 100644 (file)
@@ -7,7 +7,7 @@
 . ../common.sh
 
 PRE="../.."
-if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 2
 UNBOUND_PORT=$RND_PORT
index 9150e5e3f0bf381f34d09ad6a8ad4b5793e8a1ad..4dab457bab908fd5b9bbb4795d2d664cde57f052 100644 (file)
@@ -6,7 +6,6 @@
 
 . ../common.sh
 PRE="../.."
-if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 # Make all the queries. They need to succeed by the way.
 echo "> dig www.example.net."
index 6c59d245fa41cb333842ac0b92fab0b44b892f28..a719a260d0e48d23eb06b469cad3241a51aadab8 100644 (file)
@@ -8,7 +8,7 @@ Component:
 CmdDepends: 
 Depends: 
 Help:
-Pre:
+Pre: nss_compile.pre
 Post:
 Test: nss_compile.test
 AuxFiles: 
diff --git a/testdata/nss_compile.tdir/nss_compile.pre b/testdata/nss_compile.tdir/nss_compile.pre
new file mode 100644 (file)
index 0000000..313f603
--- /dev/null
@@ -0,0 +1,13 @@
+# #-- nss_compile.pre --#
+# source the master var file when it's there
+[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
+# use .tpkg.var.test for in test variable passing
+[ -f .tpkg.var.test ] && source .tpkg.var.test
+
+. ../common.sh
+if test "`hostname`" = "open.nlnetlabs.nl"; then
+       echo "on open, continue test"
+else
+       skip_test "not on open, no test, do this explicitly"
+fi
+exit 0
index 82b194668fd9b3889b4c34017b3ba8dc2b497162..73afd6401f64cfcdc4f648da10d0486e9e2b11b2 100644 (file)
@@ -4,13 +4,6 @@
 # use .tpkg.var.test for in test variable passing
 [ -f .tpkg.var.test ] && source .tpkg.var.test
 
-if test "`hostname`" = "open.nlnetlabs.nl"; then
-       echo "on open, continue test"
-else
-       echo "not on open, no test, do this explicitly"
-       exit 0
-fi
-
 . ../common.sh
 get_make
 PRE="../.."
index 826798a8f4f8d163b3acad2f982c484907b509a4..9121ccf257ebe9df725a551582af575b42c4d4e6 100644 (file)
@@ -7,7 +7,6 @@
 # do your teardown here
 . ../common.sh
 PRE="../.."
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 kill_pid $DNSTAP_SOCKET_PID
 kill_pid $FWD_PID
 kill_pid `cat unbound2.pid`
index 4a13d0229b11290c7e1a2e0758d918b7188044c2..fdb6386be4d86534791278fc4751ecffaa105e57 100644 (file)
@@ -6,7 +6,7 @@
 
 PRE="../.."
 . ../common.sh
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
+if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
 
 get_random_port 5
 UNBOUND_PORT=$RND_PORT
index 5111d8139ca975b35c96b4e732393e2b4a325ee9..6161a49ae25d6e1b7b3aa8089a9232140ac6377b 100644 (file)
@@ -8,7 +8,6 @@ echo There we go...
 
 PRE="../.."
 . ../common.sh
-if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
 
 echo "> query www.example.com. A"
 dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
index 875e06d0ae342c6e8b1e0a78035f6e1e3f1b2d57..8dbde8d2efd60aa4eb3b6ce7edb8d06683247f10 100644 (file)
@@ -8,13 +8,6 @@
 
 PRE="../.."
 . ../common.sh
-# if no python; exit
-if grep "define WITH_PYUNBOUND 1" $PRE/config.h; then
-       echo "have pyunbound"
-else
-       echo "no pyunbound"
-       exit 0
-fi
 
 # kill fwder
 kill_pid $FWD_PID
index 30e0059064ab1154e06762932557caae10d9d677..3a74b6019c3df0ae7a736a7c0077ff3862418a60 100644 (file)
@@ -10,8 +10,7 @@ PRE="../.."
 if grep "define WITH_PYUNBOUND 1" $PRE/config.h; then
        echo "have pyunbound"
 else
-       echo "no pyunbound"
-       exit 0
+       skip_test "no pyunbound"
 fi
 
 # Copy the required libraries
index 59f996459c174eb218f6440df8c0ff3cbea59040..a583daba47273cfd7bc93d962e76df1c8de1dea8 100644 (file)
@@ -5,13 +5,6 @@
 [ -f .tpkg.var.test ] && source .tpkg.var.test
 
 PRE="../.."
-if grep "define WITH_PYUNBOUND 1" $PRE/config.h; then
-       echo "have pyunbound"
-else
-       echo "no pyunbound"
-       exit 0
-fi
-
 if test "`uname 2>&1`" = "Darwin"; then
        echo export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:../../.libs"
        export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:../../.libs"
index 368d285edab26c231fc2730540cd479f7301dde1..5449ad47438bd5a3fe480dd1e0267c7f734fe511 100644 (file)
@@ -8,13 +8,6 @@
 
 PRE="../.."
 . ../common.sh
-# if no python; exit
-if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
-       echo "have python module"
-else
-       echo "no python module"
-       exit 0
-fi
 
 kill_pid $FWD_PID
 kill_pid $UNBOUND_PID
index 9029a8742337d2562a2c068deccb62f4c2a3f4bc..f845d6f979f28c217694e3076b19030f02839fcd 100644 (file)
@@ -10,8 +10,7 @@ PRE="../.."
 if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
        echo "have python module"
 else
-       echo "no python module"
-       exit 0
+       skip_test "no python module"
 fi
 # get module python local
 cp $PRE/pythonmod/unboundmodule.py .
index 43bf6e65f87f9a8044a2738680be31fddcdd4d5c..5ea87282b6f767a2a2a75b4a40f32c169b380297 100644 (file)
@@ -5,12 +5,6 @@
 [ -f .tpkg.var.test ] && source .tpkg.var.test
 
 PRE="../.."
-if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
-       echo "have python module"
-else
-       echo "no python module"
-       exit 0
-fi
 
 if test "`uname 2>&1`" = "Darwin"; then
         ldnsdir=`grep ldnsdir= ../../Makefile | sed -e 's/ldnsdir=//'`
index e9b307548ba7731976733175b8c300652872c5cd..b438958b26e326087861caa491a0e161ce2aee91 100644 (file)
@@ -8,13 +8,6 @@
 
 PRE="../.."
 . ../common.sh
-# if no python; exit
-if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
-       echo "have python module"
-else
-       echo "no python module"
-       exit 0
-fi
 
 kill_pid $FWD_PID
 kill_pid $UNBOUND_PID
index c16362a0b3fb358cd8c420c4e287f68277defead..79fdc0375ad445f6b19c5378acfbbb059963afdd 100644 (file)
@@ -10,8 +10,7 @@ PRE="../.."
 if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
        echo "have python module"
 else
-       echo "no python module"
-       exit 0
+       skip_test "no python module"
 fi
 # get module python local
 cp $PRE/pythonmod/unboundmodule.py .
index c6baa01be84201e3ddc743e9ea8f676dba108d2b..7c55d19ab49e5a8fb09f79fdbcbe9691ee6b241d 100644 (file)
@@ -5,12 +5,6 @@
 [ -f .tpkg.var.test ] && source .tpkg.var.test
 
 PRE="../.."
-if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
-       echo "have python module"
-else
-       echo "no python module"
-       exit 0
-fi
 
 if test "`uname 2>&1`" = "Darwin"; then
         ldnsdir=`grep ldnsdir= ../../Makefile | sed -e 's/ldnsdir=//'`
index daf231da58de4bc5fb43f395e6040e9a6fcab938..2ea179e89103c317d4af4a8acab157358558ef2a 100644 (file)
@@ -8,7 +8,7 @@ Component:
 CmdDepends: 
 Depends: 
 Help:
-Pre:
+Pre: root_anchor.pre
 Post:
 Test: root_anchor.test
 AuxFiles: 
diff --git a/testdata/root_anchor.tdir/root_anchor.pre b/testdata/root_anchor.tdir/root_anchor.pre
new file mode 100644 (file)
index 0000000..0357646
--- /dev/null
@@ -0,0 +1,11 @@
+# source the master var file when it's there
+[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
+# use .tpkg.var.test for in test variable passing
+[ -f .tpkg.var.test ] && source .tpkg.var.test
+
+# only do this test if the network is up.
+if dig @k.root-servers.net . SOA 2>&1 | grep NOERROR ; then
+       :
+else
+       skip_test "network is not up"
+fi
index f75dadf67871613f639666f81222d62886c003d8..bbff028beb585c1bfee6efdc1f8d43f63a46ff52 100644 (file)
@@ -5,15 +5,6 @@
 
 PRE="../.."
 
-# only do this test if the network is up.
-echo "is the net up?"
-if dig @k.root-servers.net . SOA 2>&1 | grep NOERROR ; then
-       echo yes
-else
-       echo no
-       exit 0
-fi
-
 # test that unbound-anchor, its builtin DNSKEY, works.
 # so the https is disabled (go to 127.0.0.1@10099).
 $PRE/unbound-anchor -u "127.0.0.1" -P 10099 -a test.ds -v
index 5576fbaf942aa34b84741f5a3299b8058834ffd6..c01f290740296b8bd47e011e330f2e9c13c46acb 100644 (file)
@@ -8,7 +8,7 @@ Component:
 CmdDepends: 
 Depends: 
 Help:
-Pre:
+Pre: root_hints.pre
 Post:
 Test: root_hints.test
 AuxFiles: 
diff --git a/testdata/root_hints.tdir/root_hints.pre b/testdata/root_hints.tdir/root_hints.pre
new file mode 100644 (file)
index 0000000..a756693
--- /dev/null
@@ -0,0 +1,11 @@
+# #-- root_hints.pre --#
+# source the master var file when it's there
+[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
+# use .tpkg.var.test for in test variable passing
+[ -f .tpkg.var.test ] && source .tpkg.var.test
+
+# dig 9 ?
+digv=`dig -v 2>&1 | wc -l`
+if test $digv -ne 1; then
+       skip_test "Dig too old. skip test"
+fi
index 6ae4ec7f467746af82aecedbceb6ec6af99eec80..a5c1dc1953908d8882130a6aa8da1c7b9cd52ee6 100644 (file)
@@ -1,4 +1,4 @@
-# #-- 06-ianaports.test --#
+# #-- root_hints.test --#
 # source the master var file when it's there
 [ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
 # use .tpkg.var.test for in test variable passing
@@ -6,13 +6,6 @@
 
 PRE="../.."
 
-# dig 9 ?
-digv=`dig -v 2>&1 | wc -l`
-if test $digv -ne 1; then
-       echo "Dig too old. skip test"
-       exit 0
-fi
-
 eval `grep ^srcdir= $PRE/Makefile`
 echo "srcdir="$srcdir