Skip to content
Snippets Groups Projects
Verified Commit e03d15ff authored by Tomas Krizek's avatar Tomas Krizek
Browse files

meson: change extra_tests to postinstall_tests (incl config tests)

parent fd0999c3
Branches
Tags
1 merge request!771meson build system
...@@ -166,7 +166,7 @@ To run in-tree tests: ...@@ -166,7 +166,7 @@ To run in-tree tests:
$ meson test --no-suite postinstall -C build_dev $ meson test --no-suite postinstall -C build_dev
More comprehensive tests require you to install kresd before running the test More comprehensive tests require you to install kresd before running the test
suite. To run all available tests (also see ``extra_tests`` build option), suite. To run all available tests (see ``postinstall_tests`` build option),
use: use:
.. code-block:: bash .. code-block:: bash
......
...@@ -71,11 +71,9 @@ else ...@@ -71,11 +71,9 @@ else
install_root_hints = false install_root_hints = false
endif endif
## Verbose log ## Additional options
opt_verbose_log = get_option('verbose_log') opt_verbose_log = get_option('verbose_log')
verbose_log = opt_verbose_log.enabled() or opt_verbose_log.auto() verbose_log = opt_verbose_log.enabled() or opt_verbose_log.auto()
## User/Group
user = get_option('user') user = get_option('user')
group = get_option('group') group = get_option('group')
...@@ -116,20 +114,6 @@ integr_tests = [ ...@@ -116,20 +114,6 @@ integr_tests = [
] ]
# Tarball
## NOTE "dist" target is explicitly not supported for two reasons
## 1) we use meson test to run integration / postinstall tests
## 2) we want custom version number, not the hard-coded string in project()
## Use "archive" target instead
run_target(
'archive',
command: [
'scripts/make-archive.sh',
meson.project_version(),
],
)
# kresconfig.h # kresconfig.h
conf_data = configuration_data() conf_data = configuration_data()
conf_data.set_quoted('PACKAGE_VERSION', meson.project_version()) conf_data.set_quoted('PACKAGE_VERSION', meson.project_version())
...@@ -186,13 +170,13 @@ endif ...@@ -186,13 +170,13 @@ endif
# Summary message # Summary message
# NOTE: ternary operator in format() not supported # NOTE: ternary operator in format() not supported
# https://github.com/mesonbuild/meson/issues/2404 # https://github.com/mesonbuild/meson/issues/2404
summary_managed_ta = managed_ta ? 'enabled' : 'disabled' s_managed_ta = managed_ta ? 'enabled' : 'disabled'
summary_systemd_socket = libsystemd.found() ? 'enabled' : 'disabled' s_systemd_socket = libsystemd.found() ? 'enabled' : 'disabled'
summary_build_client = build_client ? 'enabled' : 'disabled' s_build_client = build_client ? 'enabled' : 'disabled'
summary_build_doc = build_doc ? 'enabled' : 'disabled' s_build_doc = build_doc ? 'enabled' : 'disabled'
summary_build_extra_tests = build_extra_tests ? 'enabled' : 'disabled' s_build_postinstall_tests = build_postinstall_tests ? 'enabled' : 'disabled'
summary_build_unit_tests = build_unit_tests ? 'enabled' : 'disabled' s_build_unit_tests = build_unit_tests ? 'enabled' : 'disabled'
summary_install_kresd_conf = install_kresd_conf ? 'enabled' : 'disabled' s_install_kresd_conf = install_kresd_conf ? 'enabled' : 'disabled'
message(''' message('''
======================= SUMMARY ======================= ======================= SUMMARY =======================
...@@ -206,23 +190,23 @@ message(''' ...@@ -206,23 +190,23 @@ message('''
trust_anchors trust_anchors
keyfile_default: @0@'''.format(keyfile_default) + ''' keyfile_default: @0@'''.format(keyfile_default) + '''
managed_ta: @0@'''.format(summary_managed_ta) + ''' managed_ta: @0@'''.format(s_managed_ta) + '''
systemd: systemd:
socket activation: @0@'''.format(summary_systemd_socket) + ''' socket activation: @0@'''.format(s_systemd_socket) + '''
unit_files: @0@'''.format(systemd_unit_files) + ''' unit_files: @0@'''.format(systemd_unit_files) + '''
work_dir: @0@'''.format(systemd_work_dir) + ''' work_dir: @0@'''.format(systemd_work_dir) + '''
optional components optional components
client: @0@'''.format(summary_build_client) + ''' client: @0@'''.format(s_build_client) + '''
doc: @0@'''.format(summary_build_doc) + ''' doc: @0@'''.format(s_build_doc) + '''
extra_tests: @0@'''.format(summary_build_extra_tests) + ''' unit_tests: @0@'''.format(s_build_unit_tests) + '''
unit_tests: @0@'''.format(summary_build_unit_tests) + ''' postinstall_tests: @0@'''.format(s_build_postinstall_tests) + '''
additional additional
user: @0@'''.format(user) + ''' user: @0@'''.format(user) + '''
group: @0@'''.format(group) + ''' group: @0@'''.format(group) + '''
install_kresd_conf: @0@'''.format(summary_install_kresd_conf) + ''' install_kresd_conf: @0@'''.format(s_install_kresd_conf) + '''
======================================================= =======================================================
......
...@@ -67,33 +67,33 @@ option( ...@@ -67,33 +67,33 @@ option(
'bench', 'bench',
type: 'feature', type: 'feature',
value: 'disabled', value: 'disabled',
description: 'build benchmarks' description: 'build benchmarks',
) )
option( option(
'client', 'client',
type: 'feature', type: 'feature',
value: 'auto', value: 'auto',
description: 'build kresc client binary' description: 'build kresc client binary',
) )
option( option(
'doc', 'doc',
type: 'feature', type: 'feature',
value: 'disabled', value: 'disabled',
description: 'build html documentation' description: 'build html documentation',
) )
option( option(
'extra_tests', 'postinstall_tests',
type: 'feature', type: 'feature',
value: 'disabled', value: 'disabled',
description: 'integration tests with extra dependencies' description: 'postinstall tests with extra dependencies',
) )
option( option(
'unit_tests', 'unit_tests',
type: 'feature', type: 'feature',
value: 'auto', value: 'auto',
description: 'cmocka unit tests' description: 'cmocka unit tests',
) )
# tests # tests
## unit tests
build_unit_tests = false build_unit_tests = false
if not get_option('unit_tests').disabled() if not get_option('unit_tests').disabled()
message('--- unit_tests dependencies ---') message('--- unit_tests dependencies ---')
...@@ -11,11 +12,13 @@ if not get_option('unit_tests').disabled() ...@@ -11,11 +12,13 @@ if not get_option('unit_tests').disabled()
message('-------------------------------') message('-------------------------------')
endif endif
subdir('config')
build_extra_tests = get_option('extra_tests').enabled() # NOTE 'auto' not supported ## postinstall tests
if build_extra_tests build_postinstall_tests = get_option('postinstall_tests').enabled()
message('--- extra_tests dependencies ---') if build_postinstall_tests
subdir('config')
message('--- postinstall_tests dependencies ---')
python3 = find_program('python3') python3 = find_program('python3')
py3_deps = [] py3_deps = []
......
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