#!/usr/bin/env bash
set -e
-readonly PYTHON=${PYTHON:-python2}
-
if [ ! -d .venv ]; then
- virtualenv -p ${PYTHON} .venv
+ python3 -m venv .venv
fi
. .venv/bin/activate
python -V
+pip install -U pip wheel | cat
pip install -q -r requirements.txt | cat
mkdir -p configs
export PDNS=${PDNS:-${PWD}/../pdns/pdns_server}
export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil}
+export PDNSCONTROL=${PDNSCONTROL:-${PWD}/../pdns/pdns_control}
export PREFIX=127.0.0
fi
done
-set -e
if [ "${PDNS_DEBUG}" = "YES" ]; then
set -x
fi
-nosetests --with-xunit $@
+ignore="--ignore=test_GSSTSIG.py"
+if [ "${WITHKERBEROS}" = "YES" ]; then
+ ignore=""
+ (cd kerberos-server && sudo docker compose up --detach --build)
+fi
+
+pytest --junitxml=pytest.xml $ignore $@
+ret=$?
+
+if [ "${WITHKERBEROS}" = "YES" ]; then
+ (cd kerberos-server && sudo docker compose stop || exit 0)
+fi
+exit $ret