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