]> granicus.if.org Git - pdns/commitdiff
tests: Ensure all required tools are available
authorArthur Gautier <baloo@gandi.net>
Fri, 5 May 2017 19:25:06 +0000 (19:25 +0000)
committerArthur Gautier <baloo@gandi.net>
Tue, 9 May 2017 21:48:06 +0000 (21:48 +0000)
If one of those tools misses, the test will silently PASS.
We should ensure it is present

Signed-off-by: Arthur Gautier <baloo@gandi.net>
regression-tests/cleandig

index d0b383229245e36eb1e172630b467962f98539cb..4f34dfbf3a6bdf11182286fbaa56a5fc86dace02 100755 (executable)
@@ -1,4 +1,10 @@
 #!/bin/sh
+
+set -e
+which drill >/dev/null 2>/dev/null || (echo "missing drill tool" >&2; exit 1)
+which unbound-host >/dev/null 2>/dev/null || (echo "missing unbound-host tool" >&2; exit 1)
+set +e
+
 if [ ! -e ${testsdir}/${testname}/use.drill ]
 then
        if [ "$2" != "AXFR" ]