From: Chris Hofstaedtler Date: Tue, 27 Aug 2024 18:37:11 +0000 (+0200) Subject: regression-tests.auth-py: allow running with meson X-Git-Tag: rec-5.2.0-alpha1~115^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e6087ecbce871955127112e1cee034320142244;p=thirdparty%2Fpdns.git regression-tests.auth-py: allow running with meson dynamic modules are untested --- diff --git a/regression-tests.auth-py/authtests.py b/regression-tests.auth-py/authtests.py index ef2bbe8132..2b096d2efd 100644 --- a/regression-tests.auth-py/authtests.py +++ b/regression-tests.auth-py/authtests.py @@ -27,7 +27,7 @@ class AuthTest(AssertEqualDNSMessageMixin, unittest.TestCase): _config_params = [] _config_template_default = """ -module-dir=../regression-tests/modules +module-dir={PDNS_MODULE_DIR} daemon=no bind-config={confdir}/named.conf bind-dnssec-db={bind_dnssec_db} @@ -75,6 +75,7 @@ PrivateKey: Lt0v0Gol3pRUFM7fDdcy0IWN0O/MnEmVPA+VylL8Y4U= _auths = {} _PREFIX = os.environ['PREFIX'] + _PDNS_MODULE_DIR = os.environ['PDNS_MODULE_DIR'] @classmethod @@ -116,7 +117,9 @@ options { with open(os.path.join(confdir, 'pdns.conf'), 'w') as pdnsconf: pdnsconf.write(cls._config_template_default.format( confdir=confdir, prefix=cls._PREFIX, - bind_dnssec_db=bind_dnssec_db)) + bind_dnssec_db=bind_dnssec_db, + PDNS_MODULE_DIR=cls._PDNS_MODULE_DIR, + )) pdnsconf.write(cls._config_template % params) os.system("sqlite3 ./configs/auth/powerdns.sqlite < ../modules/gsqlite3backend/schema.sqlite3.sql") diff --git a/regression-tests.auth-py/runtests b/regression-tests.auth-py/runtests index 22f0b14639..eb47cb0bec 100755 --- a/regression-tests.auth-py/runtests +++ b/regression-tests.auth-py/runtests @@ -14,9 +14,20 @@ mkdir -p configs [ -f ./vars ] && . ./vars -export PDNS=${PDNS:-${PWD}/../pdns/pdns_server} -export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil} -export PDNSCONTROL=${PDNSCONTROL:-${PWD}/../pdns/pdns_control} +if [ -z "$PDNS_BUILD_PATH" ]; then + # PDNS_BUILD_PATH is unset or empty. Assume an autotools build. + PDNS_BUILD_PATH=. + + export PDNS=${PDNS:-${PWD}/../pdns/pdns_server} + export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil} + export PDNSCONTROL=${PDNSCONTROL:-${PWD}/../pdns/pdns_control} + export PDNS_MODULE_DIR=${PDNS_MODULE_DIR:-${PWD}/modules} +else + export PDNS=${PDNS:-$PDNS_BUILD_PATH/pdns-auth} + export PDNSUTIL=${PDNSUTIL:-$PDNS_BUILD_PATH/pdns-auth-util} + export PDNSCONTROL=${PDNSCONTROL:-$PDNS_BUILD_PATH/pdns-auth-control} + export PDNS_MODULE_DIR=${PDNS_MODULE_DIR:-$PDNS_BUILD_PATH/modules} +fi export PREFIX=127.0.0 diff --git a/regression-tests.auth-py/test_GSSTSIG.py b/regression-tests.auth-py/test_GSSTSIG.py index 8ef7c5b717..2297f46c2a 100644 --- a/regression-tests.auth-py/test_GSSTSIG.py +++ b/regression-tests.auth-py/test_GSSTSIG.py @@ -8,7 +8,7 @@ from authtests import AuthTest class GSSTSIGBase(AuthTest): _config_template_default = """ -module-dir=../regression-tests/modules +module-dir={PDNS_MODULE_DIR} daemon=no socket-dir={confdir} cache-ttl=0