]> git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests/cleandig
auth: switch circleci mssql image
[thirdparty/pdns.git] / regression-tests / cleandig
1 #!/bin/sh
2
3 set -e
4 which drill >/dev/null 2>/dev/null || (echo "missing drill tool" >&2; exit 1)
5 which unbound-host >/dev/null 2>/dev/null || (echo "missing unbound-host tool" >&2; exit 1)
6 set +e
7
8 if [ ! -e ${testsdir}/${testname}/use.drill ]
9 then
10 if [ "$2" != "AXFR" ]
11 then
12 $SDIG $nameserver $port "$1" $2 $3 $4 $5 $6 $7 $8 $9 | LC_ALL=C sort
13 else
14 $SAXFR $nameserver $port "$1" $3 $4 | LC_ALL=C sort
15 fi
16 fi
17 $NSEC3DIG $nameserver $port "$1" $2 > ${testsdir}/${testname}/nsec3dig.out 2>&1
18 if [ ! -e ${testsdir}/${testname}/skip-drill ]
19 then
20 if [ ! -s trustedkeys ]
21 then
22 drill -a -p $port -o rd -D "$1" $2 @$nameserver > ${testsdir}/${testname}/drill.out 2>&1
23 echo RETVAL: $? >> ${testsdir}/${testname}/drill.out
24 else
25 drill -a -p $port -o rd -D -S -k trustedkeys "$1" $2 @$nameserver > ${testsdir}/${testname}/drillchase.out 2>&1
26 echo RETVAL: $? >> ${testsdir}/${testname}/drillchase.out
27 drill -a -p $port -o rd -D -k trustedkeys "$1" $2 @$nameserver > ${testsdir}/${testname}/drill.out 2>&1
28 echo RETVAL: $? >> ${testsdir}/${testname}/drill.out
29 fi
30 fi
31 if [ ! -e ${testsdir}/${testname}/skip-q ]
32 then
33 /usr/lib/go/bin/q -tcp=true -short=true -rd=false -check -dnssec -port=$port @$nameserver $2 "$1" > ${testsdir}/${testname}/q.out 2>&1
34 echo RETVAL: $? >> ${testsdir}/${testname}/q.out
35 fi
36 if [ ! -e ${testsdir}/${testname}/skip-unboundhost ]
37 then
38 unbound-host -v -C unbound-host.conf -t $2 "$1" > ${testsdir}/${testname}/unbound-host.out 2>&1
39 echo RETVAL: $? >> ${testsdir}/${testname}/unbound-host.out
40 fi
41 if [ -e ${testsdir}/${testname}/use.drill ]
42 then
43 cat ${testsdir}/${testname}/drill.out | sed 's/ ;.*//'
44 fi
45 grep -iw bogus ${testsdir}/${testname}/*.out