From: Fred Morcos Date: Wed, 15 May 2024 12:41:17 +0000 (+0200) Subject: Meson: Integrate auth geoip backend regression test X-Git-Tag: rec-5.2.0-alpha0~23^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2423636886fa6f56406de7fa3637ffca8fd7745a;p=thirdparty%2Fpdns.git Meson: Integrate auth geoip backend regression test --- diff --git a/.github/workflows/build-and-test-all.yml b/.github/workflows/build-and-test-all.yml index 7d2e579ade..6a3f928a63 100644 --- a/.github/workflows/build-and-test-all.yml +++ b/.github/workflows/build-and-test-all.yml @@ -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 diff --git a/meson.build b/meson.build index 9a5617ffb9..c15b91d326 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/tasks.py b/tasks.py index 98d38d36c9..6fa635a190 100644 --- 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