From: Otto Moerbeek Date: Tue, 8 Apr 2025 14:40:20 +0000 (+0200) Subject: rec regr tests: allow to set moduledir using an env var X-Git-Tag: dnsdist-2.0.0-alpha2~73^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F15410%2Fhead;p=thirdparty%2Fpdns.git rec regr tests: allow to set moduledir using an env var This makes picking the right modulerdir explicit instead of hard-coded. With meson the location varies, and also I would like to use packaged modules even when I happen to have backend .so's in the default place. --- diff --git a/regression-tests.recursor-dnssec/recursortests.py b/regression-tests.recursor-dnssec/recursortests.py index befc25d259..5e718dcf20 100644 --- a/regression-tests.recursor-dnssec/recursortests.py +++ b/regression-tests.recursor-dnssec/recursortests.py @@ -482,12 +482,12 @@ options { };""" % (zone, zonename)) @classmethod - def generateAuthConfig(cls, confdir, threads): + def generateAuthConfig(cls, confdir, threads, extra=''): bind_dnssec_db = os.path.join(confdir, 'bind-dnssec.sqlite3') with open(os.path.join(confdir, 'pdns.conf'), 'w') as pdnsconf: pdnsconf.write(""" -module-dir=../regression-tests/modules +module-dir={moduledir} launch=bind daemon=no bind-config={confdir}/named.conf @@ -501,9 +501,12 @@ log-dns-details=yes loglevel=9 enable-lua-records dname-processing=yes -distributor-threads={threads}""".format(confdir=confdir, - bind_dnssec_db=bind_dnssec_db, - threads=threads)) +distributor-threads={threads} +{extra}""".format(moduledir=os.environ['PDNSMODULEDIR'], + confdir=confdir, + bind_dnssec_db=bind_dnssec_db, + threads=threads, + extra=extra)) pdnsutilCmd = [os.environ['PDNSUTIL'], '--config-dir=%s' % confdir, diff --git a/regression-tests.recursor-dnssec/runtests b/regression-tests.recursor-dnssec/runtests index afa840d658..3767323980 100755 --- a/regression-tests.recursor-dnssec/runtests +++ b/regression-tests.recursor-dnssec/runtests @@ -30,6 +30,8 @@ mkdir -p configs export PDNS=${PDNS:-${PWD}/../pdns/pdns_server} export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil} +export PDNSMODULEDIR=${PDNSMODULEDIR:-${PWD}/../regression-tests/modules} + export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns/recursordist/pdns_recursor} export RECCONTROL=${RECCONTROL:-${PWD}/../pdns/recursordist/rec_control}