Given that this variable now controls not just whether C tests are built, but also whether any test at all is executed, the new name is more appropriate. Update the description for the corresponding meson option accordingly. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- build-aux/meson.build | 2 +- meson.build | 14 +++++++------- meson_options.txt | 2 +- src/access/meson.build | 2 +- src/meson.build | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build-aux/meson.build b/build-aux/meson.build index 84405c5ec8..f96d46c445 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -1,6 +1,6 @@ # Skip syntax-check if not building from git because we get the list of files # to check using git commands and it fails if we are not in git repository. -if git and build_tests[0] +if git and tests_enabled[0] flake8_path = '' if flake8_prog.found() flake8_path = flake8_prog.full_path() diff --git a/meson.build b/meson.build index 5a1a81d087..397315a77d 100644 --- a/meson.build +++ b/meson.build @@ -2014,8 +2014,8 @@ endif # test options -build_tests = [ not get_option('tests').disabled() ] -if build_tests[0] and \ +tests_enabled = [ not get_option('tests').disabled() ] +if tests_enabled[0] and \ cc.get_id() == 'clang' and \ not supported_cc_flags.contains('-fsemantic-interposition') \ and get_option('optimization') != '0' @@ -2026,14 +2026,14 @@ if build_tests[0] and \ if get_option('tests').enabled() error(msg) endif - build_tests = [ false, '!!! @0@ !!!'.format(msg) ] + tests_enabled = [ false, '!!! @0@ !!!'.format(msg) ] endif if get_option('expensive_tests').auto() - use_expensive_tests = not git and build_tests[0] + use_expensive_tests = not git and tests_enabled[0] else use_expensive_tests = get_option('expensive_tests').enabled() - if use_expensive_tests and not build_tests[0] + if use_expensive_tests and not tests_enabled[0] error('cannot enable expensive tests when tests are disabled') endif endif @@ -2070,7 +2070,7 @@ subdir('src') subdir('tools') -if build_tests[0] +if tests_enabled[0] subdir('tests') else # Ensure that 'meson test' fails when tests are disabled, as opposed to @@ -2294,7 +2294,7 @@ endif misc_summary = { 'Warning Flags': supported_cc_flags, 'docs': gen_docs, - 'tests': build_tests, + 'tests': tests_enabled, 'DTrace': conf.has('WITH_DTRACE_PROBES'), 'firewalld': conf.has('WITH_FIREWALLD'), 'firewalld-zone': conf.has('WITH_FIREWALLD_ZONE'), diff --git a/meson_options.txt b/meson_options.txt index ba6e49afc5..16812f7ade 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,7 +10,7 @@ option('git_werror', type: 'feature', value: 'auto', description: 'use -Werror i option('rpath', type: 'feature', value: 'auto', description: 'whether to include rpath information in installed binaries and libraries') option('docdir', type: 'string', value: '', description: 'documentation installation directory') option('docs', type: 'feature', value: 'auto', description: 'whether to generate documentation') -option('tests', type: 'feature', value: 'auto', description: 'whether to build tests') +option('tests', type: 'feature', value: 'auto', description: 'whether to build and run tests') # build dependencies options diff --git a/src/access/meson.build b/src/access/meson.build index 6ca953c932..fc5ba5b342 100644 --- a/src/access/meson.build +++ b/src/access/meson.build @@ -105,7 +105,7 @@ access_dep = declare_dependency( generated_sym_files += access_gen_sym -if build_tests[0] +if tests_enabled[0] test( 'check-aclperms', python3_prog, diff --git a/src/meson.build b/src/meson.build index 0c64cef04e..14686065bf 100644 --- a/src/meson.build +++ b/src/meson.build @@ -942,7 +942,7 @@ meson.add_install_script( # Check driver files -if build_tests[0] +if tests_enabled[0] if host_machine.system() == 'linux' test( 'check-symfile', -- 2.41.0