]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
tests: Ensure all required tools are available
authorArthur Gautier <baloo@gandi.net>
Fri, 5 May 2017 19:25:06 +0000 (19:25 +0000)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 7 Nov 2017 20:25:32 +0000 (21:25 +0100)
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>
(cherry picked from commit 7e47805b3898cead8418a9933d1592a884842e72)

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" ]