summaryrefslogtreecommitdiffstats
path: root/tests/config/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tests/config/meson.build')
-rw-r--r--tests/config/meson.build41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/config/meson.build b/tests/config/meson.build
new file mode 100644
index 0000000..a739222
--- /dev/null
+++ b/tests/config/meson.build
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
+config_tests += [
+ ['basic', files('basic.test.lua'), ['skip_asan']],
+ ['cache', files('cache.test.lua'), ['skip_asan']],
+ ['net', files('net.test.lua'), ['config_net']],
+ ['doh2', files('doh2.test.lua')],
+ ['lru', files('lru.test.lua')],
+ ['tls', files('tls.test.lua')],
+ ['worker', files('worker.test.lua')],
+]
+
+
+run_configtest = find_program('../../scripts/test-config.sh')
+
+
+foreach config_test : config_tests
+ # additional suites
+ extra_suites = config_test.length() >= 3 ? config_test[2] : []
+
+ # environment variables for test
+ conftest_env = environment()
+ conftest_env.prepend('PATH', sbin_dir)
+ conftest_env.set('KRESD_NO_LISTEN', '1')
+ conftest_env.set('SOURCE_PATH', meson.current_source_dir())
+ conftest_env.set(
+ 'TEST_FILE', '@0@/@1@'.format(meson.source_root(), config_test[1][0]))
+
+ test(
+ 'config.' + config_test[0],
+ run_configtest,
+ args: [
+ '-c', files('test.cfg'),
+ '-n'
+ ],
+ env: conftest_env,
+ suite: [
+ 'postinstall',
+ 'config',
+ ] + extra_suites,
+ )
+endforeach