]> git.ipfire.org Git - thirdparty/pdns.git/blob - build-scripts/test-recursor
Fix recursor test in buildbot
[thirdparty/pdns.git] / build-scripts / test-recursor
1 #!/bin/sh
2
3 export PDNSRECURSOR=/usr/sbin/pdns_recursor
4 export PDNS=/usr/sbin/pdns_server
5 export SDIG=/usr/bin/sdig
6 export NSEC3DIG=/usr/bin/nsec3dig
7 export NOTIFY=/usr/bin/notify
8 export SAXFR=/usr/bin/saxfr
9
10 if [ "$0" != "./build-scripts/test-recursor" ]; then
11 echo "Please run me from the root checkout dir"
12 exit 1
13 fi
14
15 set -x
16
17 cd regression-tests/modules
18
19 MODULES=""
20
21 for dir in /usr/lib/x86_64-linux-gnu/pdns /usr/lib64/pdns; do
22 if [ -d $dir ]; then
23 MODULES=$dir
24 break
25 fi
26 done
27 [ -z $MODULES ] && echo "No module directory found" >&2 && exit 1
28
29 # Symlink the modules on the system
30 cd regression-tests/modules
31 for backend in *.so; do
32 ln -sf $MODULES/$backend $backend
33 done
34
35 cd ../../regression-tests.recursor
36 cp vars.sample vars
37 sed -i 's!PREFIX=.*!PREFIX=127.0.0!' vars
38
39 EXIT=0
40
41 ./config.sh
42 ./start.sh
43 sleep 3
44 svstat configs/*
45 ./runtests || EXIT=1
46 ./stop.sh
47 sleep 3
48 ./clean.sh
49
50 exit $EXIT