]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Integrate auth geoip backend regression test
authorFred Morcos <fred.morcos@open-xchange.com>
Wed, 15 May 2024 12:41:17 +0000 (14:41 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 12 Jun 2024 10:14:50 +0000 (12:14 +0200)
.github/workflows/build-and-test-all.yml
meson.build
tasks.py

index 7d2e579ade48f193bf2e302f44c9d3cda4481128..6a3f928a636f7c2d6f6613b5a105bcf4097a75fe 100644 (file)
@@ -104,7 +104,11 @@ jobs:
         working-directory: .
       - run: inv ci-auth-build ${{ matrix.build_option }} # This runs under pdns-$BUILDER_VERSION/pdns/ for make bear
       - run: inv ci-auth-install-remotebackend-test-deps
+      - if: ${{ matrix.builder == 'meson' }}
+        run: inv install-auth-test-deps-only -b geoip
       - run: inv ci-auth-run-unit-tests ${{ matrix.build_option }}
+        env:
+          PDNS_MESON_PATH: ../pdns-${{ env.BUILDER_VERSION }}
       - run: inv generate-coverage-info ./testrunner $GITHUB_WORKSPACE
         if: ${{ env.COVERAGE == 'yes' && matrix.builder != 'meson' }}
         working-directory: ./pdns-${{ env.BUILDER_VERSION }}/pdns
index 9a5617ffb9b17339bb50b972f5e3bc23b64ae1a6..c15b91d3266826ae3f51bd945d1d02491bd9b9c0 100644 (file)
@@ -1076,3 +1076,17 @@ if get_option('module-remote') != 'disabled' and get_option('unit-tests-backends
     )
   endforeach
 endif
+
+if get_option('unit-tests-backends')
+  start_test_stop = files('regression-tests' / 'start-test-stop')[0]
+endif
+
+if get_option('module-geoip') != 'disabled' and get_option('unit-tests-backends')
+  test(
+    'pdns-auth-backend-geoip',
+    start_test_stop,
+    args: ['5300', 'geoip'],
+    workdir: product_source_dir / 'regression-tests',
+    depends: [pdns_auth],
+  )
+endif
index 98d38d36c9dbb42cbbaa7b8a19bb2e871dabdd06..6fa635a1902fcdca101101553fb95c4d8f7e0f14 100644 (file)
--- a/tasks.py
+++ b/tasks.py
@@ -259,12 +259,16 @@ auth_backend_test_deps = dict(
 )
 
 @task(help={'backend': 'Backend to install test deps for, e.g. gsqlite3; can be repeated'}, iterable=['backend'], optional=['backend'])
-def install_auth_test_deps(c, backend): # FIXME: rename this, we do way more than apt-get
+def install_auth_test_deps_only(c, backend):
     extra=[]
     for b in backend:
         extra.extend(auth_backend_test_deps[b])
     c.sudo('DEBIAN_FRONTEND=noninteractive apt-get -y install ' + ' '.join(extra+auth_test_deps))
 
+@task(help={'backend': 'Backend to install test deps for, e.g. gsqlite3; can be repeated'}, iterable=['backend'], optional=['backend'])
+def install_auth_test_deps(c, backend): # FIXME: rename this, we do way more than apt-get
+    install_auth_test_deps_only(c, backend)
+
     c.run('chmod +x /opt/pdns-auth/bin/* /opt/pdns-auth/sbin/*')
     # c.run('''if [ ! -e $HOME/bin/jdnssec-verifyzone ]; then
     #               wget https://github.com/dblacka/jdnssec-tools/releases/download/0.14/jdnssec-tools-0.14.tar.gz