From: Fred Morcos Date: Tue, 8 Aug 2023 13:51:56 +0000 (+0200) Subject: Meson: Auth backend unit tests meson module X-Git-Tag: rec-5.1.0-alpha1~80^2~282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21196e0f86d55101da3b9d3021fe9b94566a0c4e;p=thirdparty%2Fpdns.git Meson: Auth backend unit tests meson module --- diff --git a/meson.build b/meson.build index 1841b26cd8..09b0a9ac6f 100644 --- a/meson.build +++ b/meson.build @@ -56,6 +56,7 @@ subdir('meson' / 'clock-gettime') # Clock_gettime subdir('meson' / 'boost') # Boost subdir('meson' / 'boost-program-options') # Boost Program Options Library subdir('meson' / 'unit-tests') # Unit Tests +subdir('meson' / 'auth-backend-unit-test') # Auth Backend Unit Tests subdir('meson' / 'reproducible') # Reproducible Builds subdir('meson' / 'fuzz-targets') # Fuzzing Targets subdir('meson' / 'python-venv') # Python Venv @@ -78,15 +79,6 @@ if not ragel.found() and not fs.exists('pdns' / 'dnslabeltext.cc') 'Install Ragel or download the sources from www.powerdns.com') endif -# Backend Unit Tests -opt_backend_unittests = get_option('unit-tests-backends') -dep_boost_test = dependency('boost', modules: ['unit_test_framework'], required: opt_backend_unittests) -deps += dep_boost_test -conf.set10('BACKEND_UNIT_TESTS', opt_backend_unittests, description: 'Whether backend unit tests are enabled') -if not opt_unittests - summary('Test', dep_boost_test.found(), bool_yn: true, section: 'Boost') -endif - # Swagger if not fs.exists('pdns/api-swagger.json') and not python_have_venv error('Python3 and/or its venv module is not available and ' + diff --git a/meson/auth-backend-unit-tests/meson.build b/meson/auth-backend-unit-tests/meson.build new file mode 100644 index 0000000000..94f5614ca2 --- /dev/null +++ b/meson/auth-backend-unit-tests/meson.build @@ -0,0 +1,10 @@ +# Auth Backend Unit Tests +# Inputs: conf deps + +opt_backend_unittests = get_option('unit-tests-backends') +dep_boost_test = dependency('boost', modules: ['unit_test_framework'], required: opt_backend_unittests) +deps += dep_boost_test +conf.set10('BACKEND_UNIT_TESTS', opt_backend_unittests, description: 'Whether backend unit tests are enabled') +if not opt_unittests + summary('Test', dep_boost_test.found(), bool_yn: true, section: 'Boost') +endif