Commit dd4286ef authored by Tomas Krizek's avatar Tomas Krizek

meson: split postinstall_tests into extra_tests and config_tests

parent edf08b19
......@@ -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
......
......@@ -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
......
......@@ -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) + '''
......
......@@ -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',
......
......@@ -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 = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment