summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml8
-rw-r--r--doc/build.rst2
-rw-r--r--meson.build6
-rw-r--r--meson_options.txt14
-rw-r--r--tests/meson.build19
5 files changed, 33 insertions, 16 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 39e70a95..922d5140 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -50,7 +50,7 @@ archive:
build:
<<: *build
script:
- - meson build_ci --default-library=static --prefix=$PREFIX -Dwerror=true -Dpostinstall_tests=enabled
+ - meson build_ci --default-library=static --prefix=$PREFIX -Dwerror=true -Dextra_tests=enabled
- ninja -C build_ci
- ninja -C build_ci install >/dev/null
- ${MESON_TEST} --suite unit --suite config
@@ -58,7 +58,7 @@ build:
build-asan:
<<: *build
script:
- - meson build_ci_asan --default-library=static --prefix=$PREFIX -Db_sanitize=address,undefined -Dpostinstall_tests=enabled
+ - meson build_ci_asan --default-library=static --prefix=$PREFIX -Db_sanitize=address,undefined -Dextra_tests=enabled
- ninja -C build_ci_asan
- ninja -C build_ci_asan install >/dev/null
- ${MESON_TEST} --suite unit --suite config
@@ -190,10 +190,10 @@ lint:pedantic:
- linux
- amd64
script:
- - meson build_pedantic_gcc -Dwerror=true -Dc_args='-Wpedantic' -Dpostinstall_tests=enabled
+ - meson build_pedantic_gcc -Dwerror=true -Dc_args='-Wpedantic' -Dextra_tests=enabled
- ninja -C build_pedantic_gcc
- >
- CC=clang CXX=clang++ meson build_pedantic_clang -Dwerror=true -Dpostinstall_tests=enabled -Dc_args='
+ CC=clang CXX=clang++ meson build_pedantic_clang -Dwerror=true -Dextra_tests=enabled -Dc_args='
-Wpedantic -Wno-newline-eof -Wno-gnu-zero-variadic-macro-arguments -Wno-gnu-folding-constant'
- ninja -C build_pedantic_clang
diff --git a/doc/build.rst b/doc/build.rst
index 3f4702d1..70b5562f 100644
--- a/doc/build.rst
+++ b/doc/build.rst
@@ -186,7 +186,7 @@ The following command runs all tests. By default, only unit tests are enabled.
$ meson test -C build_dev
More comprehensive tests require you to install kresd before running the test
-suite. To run all available tests, use ``-Dpostinstall_tests=enabled`` build
+suite. To run all available tests, use ``-Dextra_tests=enabled`` build
option.
.. code-block:: bash
diff --git a/meson.build b/meson.build
index 5d0f31f4..ebae055a 100644
--- a/meson.build
+++ b/meson.build
@@ -231,7 +231,8 @@ s_managed_ta = managed_ta ? 'enabled' : 'disabled'
s_systemd_socket = libsystemd.found() ? 'enabled' : 'disabled'
s_build_client = build_client ? 'enabled' : 'disabled'
s_build_unit_tests = build_unit_tests ? 'enabled' : 'disabled'
-s_build_postinstall_tests = build_postinstall_tests ? 'enabled' : 'disabled'
+s_build_config_tests = build_config_tests ? 'enabled' : 'disabled'
+s_build_extra_tests = build_extra_tests ? 'enabled' : 'disabled'
s_install_kresd_conf = install_kresd_conf ? 'enabled' : 'disabled'
# TODO mention dnstap installation?
message('''
@@ -257,7 +258,8 @@ message('''
optional components
client: @0@'''.format(s_build_client) + '''
unit_tests: @0@'''.format(s_build_unit_tests) + '''
- postinstall_tests: @0@'''.format(s_build_postinstall_tests) + '''
+ config_tests: @0@'''.format(s_build_config_tests) + '''
+ extra_tests: @0@'''.format(s_build_extra_tests) + '''
additional
user: @0@'''.format(user) + '''
diff --git a/meson_options.txt b/meson_options.txt
index 06cc823b..c1308cac 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -115,7 +115,19 @@ option(
)
option(
- 'postinstall_tests',
+ 'config_tests',
+ type: 'combo',
+ choices: [
+ 'auto',
+ 'enabled',
+ 'disabled',
+ ],
+ value: 'auto',
+ description: 'postinstall config tests',
+)
+
+option(
+ 'extra_tests',
type: 'combo',
choices: [
'auto',
diff --git a/tests/meson.build b/tests/meson.build
index eabf6f5c..ae905a9d 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -12,17 +12,20 @@ if get_option('unit_tests') != 'disabled'
message('-------------------------------')
endif
+build_extra_tests = get_option('extra_tests') == 'enabled'
+build_config_tests = get_option('config_tests') == 'enabled'
+if get_option('config_tests') == 'auto'
+ build_config_tests = build_extra_tests
+endif
-## postinstall tests
-build_postinstall_tests = get_option('postinstall_tests') == 'enabled'
-if build_postinstall_tests
- if meson.version().version_compare('<0.46')
- error('meson 0.46+ is required for postinstall_tests')
- endif
-
+## config tests
+if build_config_tests
subdir('config')
+endif
- message('--- postinstall_tests dependencies ---')
+## extra tests
+if build_extra_tests
+ message('--- extra_tests dependencies ---')
python3 = find_program('python3')
py3_deps = []