]>
Commit | Line | Data |
---|---|---|
434e4760 PL |
1 | #!/bin/sh |
2 | ||
bf6096f5 | 3 | export PDNSRECURSOR=${PDNSRECURSOR:-"/usr/sbin/pdns_recursor"} |
7568b07d | 4 | export RECCONTROL=${RECCONTROL:-"/usr/bin/rec_control"} |
bf6096f5 | 5 | export PDNS=${PDNS:-"/usr/sbin/pdns_server"} |
7568b07d | 6 | export PDNSUTIL=${PDNSUTIL:-"/usr/bin/pdnsutil"} |
bf6096f5 PL |
7 | export SDIG=${SDIG:-"/usr/bin/sdig"} |
8 | export NSEC3DIG=${NSEC3DIG:-"/usr/bin/nsec3dig"} | |
9 | export NOTIFY=${NOTIFY:-"/usr/bin/notify"} | |
10 | export SAXFR=${SAXFR:-"/usr/bin/saxfr"} | |
ffb198de | 11 | |
434e4760 PL |
12 | if [ "$0" != "./build-scripts/test-recursor" ]; then |
13 | echo "Please run me from the root checkout dir" | |
14 | exit 1 | |
15 | fi | |
16 | ||
17 | set -x | |
18 | ||
607d24f9 OM |
19 | EXTRA_ARG="" |
20 | if [ $PWD = /srv/buildbot-worker/test-rec-debian-buster/build ]; then | |
21 | EXTRA_ARG=--ignore=test_SNMP.py | |
22 | fi | |
23 | ||
cd82fe94 PL |
24 | cd regression-tests/modules |
25 | ||
26 | MODULES="" | |
27 | ||
28 | for dir in /usr/lib/x86_64-linux-gnu/pdns /usr/lib64/pdns; do | |
29 | if [ -d $dir ]; then | |
30 | MODULES=$dir | |
31 | break | |
32 | fi | |
33 | done | |
34 | [ -z $MODULES ] && echo "No module directory found" >&2 && exit 1 | |
35 | ||
36 | # Symlink the modules on the system | |
cd82fe94 PL |
37 | for backend in *.so; do |
38 | ln -sf $MODULES/$backend $backend | |
39 | done | |
40 | ||
41 | cd ../../regression-tests.recursor | |
ffb198de PL |
42 | cp vars.sample vars |
43 | sed -i 's!PREFIX=.*!PREFIX=127.0.0!' vars | |
44 | ||
45 | EXIT=0 | |
46 | ||
47 | ./config.sh | |
48 | ./start.sh | |
49 | sleep 3 | |
50 | svstat configs/* | |
fc3c2d2e CHB |
51 | ## prints the logs of supervised processes reported as running for less than 3 secs |
52 | for config in configs/* ; do | |
86bb687c | 53 | secs=$(svstat ${config} | perl -pe 's!.* (\d+) seconds!\1!') |
fc3c2d2e CHB |
54 | if [ -n "${secs}" ] && [ ${secs} -lt 3 ] ; then |
55 | echo "-----------------" | |
56 | echo "Logs of ${config}" | |
57 | echo "-----------------" | |
58 | cat ${config}/logfile | |
59 | fi | |
60 | done | |
ffb198de PL |
61 | ./runtests || EXIT=1 |
62 | ./stop.sh | |
63 | sleep 3 | |
64 | ./clean.sh | |
434e4760 | 65 | |
7568b07d | 66 | cd ../regression-tests.recursor-dnssec |
607d24f9 OM |
67 | |
68 | ./runtests $EXTRA_ARG $@ || EXIT=1 | |
a002923f | 69 | ./printlogs.py || true |
7568b07d | 70 | |
ffb198de | 71 | exit $EXIT |