]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Auth backend unit tests meson module
authorFred Morcos <fred.morcos@open-xchange.com>
Tue, 8 Aug 2023 13:51:56 +0000 (15:51 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:34 +0000 (13:28 +0100)
meson.build
meson/auth-backend-unit-tests/meson.build [new file with mode: 0644]

index 1841b26cd8815ba8a7846e8f12a4be25cbeb4377..09b0a9ac6ff874703aa23def2958fbf34178766b 100644 (file)
@@ -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 (file)
index 0000000..94f5614
--- /dev/null
@@ -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