]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec regr tests: allow to set moduledir using an env var 15410/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 8 Apr 2025 14:40:20 +0000 (16:40 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 9 Apr 2025 07:19:07 +0000 (09:19 +0200)
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.

regression-tests.recursor-dnssec/recursortests.py
regression-tests.recursor-dnssec/runtests

index befc25d259afbfd3593d408317aec0254561231c..5e718dcf208a2f8330e53c10aee548c958357079 100644 (file)
@@ -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,
index afa840d65853b109cf1297e1b2de740e8c262ce1..3767323980bb16ba4a607add154f9ea72b6cb2a2 100755 (executable)
@@ -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}