Blame SOURCES/unbound-1.6.3-longcheck-fixup.patch

4359b6
diff --git a/testcode/do-tests.sh b/testcode/do-tests.sh
4359b6
index 5439f0f..1e9a424 100755
4359b6
--- a/testcode/do-tests.sh
4359b6
+++ b/testcode/do-tests.sh
4359b6
@@ -1,6 +1,10 @@
4359b6
 #!/usr/bin/env bash
4359b6
 . testdata/common.sh
4359b6
 
4359b6
+# make sure that the binaries used during tests can find the libraries compiled with them
4359b6
+LD_LIBRARY_PATH_BAK="$LD_LIBRARY_PATH"
4359b6
+export LD_LIBRARY_PATH="$(pwd)/.libs"
4359b6
+
4359b6
 NEED_SPLINT='00-lint.tdir'
4359b6
 NEED_DOXYGEN='01-doc.tdir'
4359b6
 NEED_XXD='fwd_compress_c00c.tdir fwd_zero.tdir'
4359b6
@@ -11,6 +15,20 @@ NEED_IPV6='fwd_ancil.tdir fwd_tcp_tc6.tdir stub_udp6.tdir edns_cache.tdir'
4359b6
 NEED_NOMINGW='tcp_sigpipe.tdir 07-confroot.tdir 08-host-lib.tdir fwd_ancil.tdir'
4359b6
 NEED_DNSCRYPT_PROXY='dnscrypt_queries.tdir dnscrypt_queries_chacha.tdir'
4359b6
 
4359b6
+# 01-doc - checks for errors and warnings and there are warnings due to obsolted keywords
4359b6
+# in the doxygen documentation. Not a big deal, therefore skipping this.
4359b6
+#
4359b6
+# 06-ianaports - This checks if the bundled copy is up to date, which is obviously not
4359b6
+# as the version we are shipping is old version
4359b6
+#
4359b6
+# root_anchor - This fails because the pem file has been updated and re are shipping an
4359b6
+# old copy of it.
4359b6
+#
4359b6
+# root_hints - This fails because addresses of root servers changed and we are shipping
4359b6
+# an old copy of it. This is not an issue as all servers usually do priming on startup
4359b6
+#
4359b6
+ALWAYS_SKIP='01-doc.tdir 06-ianaports.tdir root_anchor.tdir root_hints.tdir'
4359b6
+
4359b6
 # test if dig and ldns-testns are available.
4359b6
 test_tool_avail "dig"
4359b6
 test_tool_avail "ldns-testns"
4359b6
@@ -52,6 +70,11 @@ for test in `ls -d *.tdir`; do
4359b6
 			SKIP=1;
4359b6
 		fi
4359b6
 	fi
4359b6
+
4359b6
+	if echo $ALWAYS_SKIP | grep $test >/dev/null; then
4359b6
+		SKIP=1;
4359b6
+	fi
4359b6
+
4359b6
 	if test $SKIP -eq 0; then
4359b6
 		echo $test
4359b6
 		sh ../testcode/mini_tdir.sh -a ../.. exe $test
4359b6
@@ -59,5 +82,21 @@ for test in `ls -d *.tdir`; do
4359b6
 		echo "skip $test"
4359b6
 	fi
4359b6
 done
4359b6
-sh ../testcode/mini_tdir.sh report
4359b6
+sh ../testcode/mini_tdir.sh report > .report.txt
4359b6
+cat .report.txt
4359b6
+
4359b6
+# Make sure the test suite fails when some test failed
4359b6
+if grep "FAILED" .report.txt >/dev/null; then
4359b6
+	echo "Some tests FAILED!!!"
4359b6
+	RESULTS=1
4359b6
+else
4359b6
+	echo "All tests PASSED"
4359b6
+	RESULTS=0
4359b6
+fi
4359b6
+rm -f .report.txt
4359b6
 cat .perfstats.txt
4359b6
+
4359b6
+# restore LD_LIBRARY_PATH
4359b6
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH_BAK
4359b6
+
4359b6
+exit $RESULTS