]> git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests.recursor-dnssec/runtests
Merge pull request #7677 from rgacogne/dnsdist-logging-facility
[thirdparty/pdns.git] / regression-tests.recursor-dnssec / runtests
1 #!/bin/sh
2
3 PYTHON=${PYTHON:-python2}
4
5 if [ ! -d .venv ]; then
6 virtualenv -p ${PYTHON} .venv
7 fi
8 . .venv/bin/activate
9 python -V
10 pip install -U pip
11 pip install -r requirements.txt
12
13 protoc -I=../pdns/ --python_out=. ../pdns/dnsmessage.proto
14
15 mkdir -p configs
16
17 [ -f ./vars ] && . ./vars
18
19 export PDNS=${PDNS:-${PWD}/../pdns/pdns_server}
20 export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil}
21 export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns/recursordist/pdns_recursor}
22 export RECCONTROL=${RECCONTROL:-${PWD}/../pdns/recursordist/rec_control}
23
24 LIBFAKETIME_DEFAULT=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 # ubuntu default
25 LIBAUTHBIND_DEFAULT=/usr/lib/authbind/libauthbind.so.1
26 if [ $(uname -s) = "Darwin" ]; then
27 # macOS is not /really/ supported here; it works for some tests, and then you might need sudo.
28 LIBFAKETIME_DEFAULT=/usr/local/lib/faketime/libfaketime.1.dylib
29 LIBAUTHBIND_DEFAULT=""
30 fi
31
32 export LIBFAKETIME=${LIBFAKETIME:-$LIBFAKETIME_DEFAULT}
33 export LIBAUTHBIND=${LIBAUTHBIND:-$LIBAUTHBIND_DEFAULT}
34
35 export PREFIX=127.0.0
36
37 for bin in "$PDNS" "$PDNSUTIL" "$PDNSRECURSOR" "$RECCONTROL" "$LIBFAKETIME" "$LIBAUTHBIND"; do
38 if [ -n "$bin" -a ! -e "$bin" ]; then
39 echo "E: Required binary $bin not found. Please install the binary and/or edit ./vars."
40 exit 1
41 fi
42 done
43
44 set -e
45 if [ "${PDNS_DEBUG}" = "YES" ]; then
46 set -x
47 fi
48 LD_PRELOAD="${LIBASAN} ${LIBAUTHBIND} ${LIBFAKETIME}" nosetests -I test_WellKnown.py --with-xunit $@