]> git.ipfire.org Git - thirdparty/pdns.git/blame - regression-tests.recursor-dnssec/runtests
Merge pull request #11014 from kpfleming/rec-doc-improvement
[thirdparty/pdns.git] / regression-tests.recursor-dnssec / runtests
CommitLineData
7568b07d
PL
1#!/bin/sh
2
3if [ ! -d .venv ]; then
98508251 4 python3 -m venv .venv
7568b07d
PL
5fi
6. .venv/bin/activate
7python -V
38a3b7c0
OM
8pip install -U pip | cat
9pip install -r requirements.txt | cat
7568b07d 10
f1c7929a 11protoc -I=../pdns/ --python_out=. ../pdns/dnsmessage.proto
fc7f729f
OM
12protoc -I=../pdns/ --python_out=. ../pdns/dnstap.proto
13
f1c7929a 14
7568b07d
PL
15mkdir -p configs
16
cb54e9b5
PL
17[ -f ./vars ] && . ./vars
18
7568b07d
PL
19export PDNS=${PDNS:-${PWD}/../pdns/pdns_server}
20export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil}
21export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns/recursordist/pdns_recursor}
22export RECCONTROL=${RECCONTROL:-${PWD}/../pdns/recursordist/rec_control}
025d939d
CH
23
24LIBFAKETIME_DEFAULT=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 # ubuntu default
25LIBAUTHBIND_DEFAULT=/usr/lib/authbind/libauthbind.so.1
26if [ $(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=""
30fi
fc7f729f
OM
31if [ $(uname -s) = "OpenBSD" ]; then
32 # OpenBSD is not /really/ supported here; it works for some tests, and then you might need sudo.
33 LIBFAKETIME_DEFAULT=""
34 LIBAUTHBIND_DEFAULT=""
35fi
025d939d
CH
36
37export LIBFAKETIME=${LIBFAKETIME:-$LIBFAKETIME_DEFAULT}
38export LIBAUTHBIND=${LIBAUTHBIND:-$LIBAUTHBIND_DEFAULT}
7568b07d 39
05a91e33 40export PREFIX=127.0.0
7568b07d 41
025d939d
CH
42for bin in "$PDNS" "$PDNSUTIL" "$PDNSRECURSOR" "$RECCONTROL" "$LIBFAKETIME" "$LIBAUTHBIND"; do
43 if [ -n "$bin" -a ! -e "$bin" ]; then
44 echo "E: Required binary $bin not found. Please install the binary and/or edit ./vars."
45 exit 1
46 fi
47done
cb54e9b5 48
7568b07d
PL
49set -e
50if [ "${PDNS_DEBUG}" = "YES" ]; then
51 set -x
52fi
fc7f729f
OM
53
54if ! "$PDNSRECURSOR" --version 2>&1 | grep Features | grep -q dnstap-framestream; then
55 export NODNSTAPTESTS=1
56fi
57
2b219e37 58# libfstrm has a bad interaction with libfaketime on at least Ubuntu Focal.
6b45d67b
O
59# to run the test without LIBFAKETIME, we clear the var if it set to /bin/false
60if [ "$LIBFAKETIME" = "/bin/false" ]; then
61 LIBFAKETIME=""
62fi
63
fc7f729f 64if [ "${LIBAUTHBIND}" != "" -o "${LIBFAKETIME}" != "" ]; then
f1c7929a 65LD_PRELOAD="${LIBASAN} ${LIBAUTHBIND} ${LIBFAKETIME}" nosetests -I test_WellKnown.py --with-xunit $@
fc7f729f
OM
66else
67nosetests -I test_WellKnown.py --with-xunit $@
68fi