]> git.ipfire.org Git - thirdparty/pdns.git/blame - regression-tests.auth-py/runtests
dnsdist: Properly increase the HTTP connections counter w/ nghttp2
[thirdparty/pdns.git] / regression-tests.auth-py / runtests
CommitLineData
1bc56192
CHB
1#!/usr/bin/env bash
2set -e
3
1bc56192 4if [ ! -d .venv ]; then
98508251 5 python3 -m venv .venv
1bc56192
CHB
6fi
7
8. .venv/bin/activate
9python -V
ba0b1412 10pip install -U pip wheel | cat
38a3b7c0 11pip install -q -r requirements.txt | cat
1bc56192
CHB
12
13mkdir -p configs
14
15[ -f ./vars ] && . ./vars
16
17export PDNS=${PDNS:-${PWD}/../pdns/pdns_server}
18export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil}
8bed4b38 19export PDNSCONTROL=${PDNSCONTROL:-${PWD}/../pdns/pdns_control}
1bc56192
CHB
20
21export PREFIX=127.0.0
22
dee67e38 23for bin in "$PDNS" "$PDNSUTIL"; do
1bc56192
CHB
24 if [ -n "$bin" -a ! -e "$bin" ]; then
25 echo "E: Required binary $bin not found. Please install the binary and/or edit ./vars."
26 exit 1
27 fi
28done
29
1bc56192
CHB
30if [ "${PDNS_DEBUG}" = "YES" ]; then
31 set -x
32fi
33
fb9834ab 34ignore="--ignore=test_GSSTSIG.py"
bb4f68fd
OM
35if [ "${WITHKERBEROS}" = "YES" ]; then
36 ignore=""
1eeedb0c 37 (cd kerberos-server && sudo docker compose up --detach --build)
bb4f68fd
OM
38fi
39
fb9834ab 40pytest --junitxml=pytest.xml $ignore $@
bb4f68fd
OM
41ret=$?
42
43if [ "${WITHKERBEROS}" = "YES" ]; then
1eeedb0c 44 (cd kerberos-server && sudo docker compose stop || exit 0)
bb4f68fd
OM
45fi
46exit $ret