3 export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION
=python
5 if [ ! -d .venv
]; then
10 pip
install -U pip |
cat
11 pip
install -r requirements.txt |
cat
13 protoc
-I=..
/pdns
/ --python_out=. ..
/pdns
/dnsmessage.proto
14 protoc
-I=..
/pdns
/ --python_out=. ..
/pdns
/dnstap.proto
19 [ -f .
/vars
] && . .
/vars
21 export PDNS
=${PDNS:-${PWD}/../pdns/pdns_server}
22 export PDNSUTIL
=${PDNSUTIL:-${PWD}/../pdns/pdnsutil}
23 export PDNSRECURSOR
=${PDNSRECURSOR:-${PWD}/../pdns/recursordist/pdns_recursor}
24 export RECCONTROL
=${RECCONTROL:-${PWD}/../pdns/recursordist/rec_control}
26 LIBFAKETIME_DEFAULT
=/usr
/lib
/x86_64-linux-gnu
/faketime
/libfaketimeMT.so
.1 # ubuntu default
27 LIBAUTHBIND_DEFAULT
=/usr
/lib
/authbind
/libauthbind.so
.1
28 if [ $
(uname
-s) = "Darwin" ]; then
29 # macOS is not /really/ supported here; it works for some tests, and then you might need sudo.
30 LIBFAKETIME_DEFAULT
=/usr
/local
/lib
/faketime
/libfaketime
.1.dylib
31 LIBAUTHBIND_DEFAULT
=""
33 if [ $
(uname
-s) = "OpenBSD" ]; then
34 # OpenBSD is not /really/ supported here; it works for some tests, and then you might need sudo.
35 LIBFAKETIME_DEFAULT
=""
36 LIBAUTHBIND_DEFAULT
=""
39 export LIBFAKETIME
=${LIBFAKETIME:-$LIBFAKETIME_DEFAULT}
40 export LIBAUTHBIND
=${LIBAUTHBIND:-$LIBAUTHBIND_DEFAULT}
44 for bin
in "$PDNS" "$PDNSUTIL" "$PDNSRECURSOR" "$RECCONTROL" "$LIBFAKETIME" "$LIBAUTHBIND"; do
45 if [ -n "$bin" -a ! -e "$bin" ]; then
46 echo "E: Required binary $bin not found. Please install the binary and/or edit ./vars."
52 if [ "${PDNS_DEBUG}" = "YES" ]; then
56 if ! "$PDNSRECURSOR" --version 2>&1 |
grep Features |
grep -q dnstap-framestream
; then
57 export NODNSTAPTESTS
=1
60 # LIBFAKETIME is only added to LD_PRELOAD by the pyton code when needed
61 if [ "${LIBASAN}" != "" -o "${LIBAUTHBIND}" != "" ]; then
62 LD_PRELOAD
="${LIBASAN} ${LIBAUTHBIND}" pytest
--ignore=test_WellKnown.py
--junitxml=pytest.xml $@
64 pytest
--ignore=test_WellKnown.py
--junitxml=pytest.xml $@