mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
meson: Rename build_tests -> tests_enabled
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@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
87f14badd0
commit
4242a94816
@ -1,6 +1,6 @@
|
|||||||
# Skip syntax-check if not building from git because we get the list of files
|
# 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.
|
# 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 = ''
|
flake8_path = ''
|
||||||
if flake8_prog.found()
|
if flake8_prog.found()
|
||||||
flake8_path = flake8_prog.full_path()
|
flake8_path = flake8_prog.full_path()
|
||||||
|
@ -119,7 +119,7 @@ html_xslt_gen = []
|
|||||||
|
|
||||||
# --- end of XSLT processing ---
|
# --- end of XSLT processing ---
|
||||||
|
|
||||||
if build_tests[0]
|
if tests_enabled[0]
|
||||||
test(
|
test(
|
||||||
'check-html',
|
'check-html',
|
||||||
xmllint_prog,
|
xmllint_prog,
|
||||||
|
@ -351,7 +351,7 @@ run_target(
|
|||||||
depends: install_web_deps,
|
depends: install_web_deps,
|
||||||
)
|
)
|
||||||
|
|
||||||
if build_tests[0]
|
if tests_enabled[0]
|
||||||
test(
|
test(
|
||||||
'check-html-references',
|
'check-html-references',
|
||||||
python3_prog,
|
python3_prog,
|
||||||
|
14
meson.build
14
meson.build
@ -2027,8 +2027,8 @@ conf.set_quoted('TLS_PRIORITY', get_option('tls_priority'))
|
|||||||
|
|
||||||
# test options
|
# test options
|
||||||
|
|
||||||
build_tests = [ not get_option('tests').disabled() ]
|
tests_enabled = [ not get_option('tests').disabled() ]
|
||||||
if build_tests[0] and \
|
if tests_enabled[0] and \
|
||||||
cc.get_id() == 'clang' and \
|
cc.get_id() == 'clang' and \
|
||||||
not supported_cc_flags.contains('-fsemantic-interposition') \
|
not supported_cc_flags.contains('-fsemantic-interposition') \
|
||||||
and get_option('optimization') != '0'
|
and get_option('optimization') != '0'
|
||||||
@ -2039,14 +2039,14 @@ if build_tests[0] and \
|
|||||||
if get_option('tests').enabled()
|
if get_option('tests').enabled()
|
||||||
error(msg)
|
error(msg)
|
||||||
endif
|
endif
|
||||||
build_tests = [ false, '!!! @0@ !!!'.format(msg) ]
|
tests_enabled = [ false, '!!! @0@ !!!'.format(msg) ]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('expensive_tests').auto()
|
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
|
else
|
||||||
use_expensive_tests = get_option('expensive_tests').enabled()
|
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')
|
error('cannot enable expensive tests when tests are disabled')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -2083,7 +2083,7 @@ subdir('src')
|
|||||||
|
|
||||||
subdir('tools')
|
subdir('tools')
|
||||||
|
|
||||||
if build_tests[0]
|
if tests_enabled[0]
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
else
|
else
|
||||||
# Ensure that 'meson test' fails when tests are disabled, as opposed to
|
# Ensure that 'meson test' fails when tests are disabled, as opposed to
|
||||||
@ -2307,7 +2307,7 @@ endif
|
|||||||
misc_summary = {
|
misc_summary = {
|
||||||
'Warning Flags': supported_cc_flags,
|
'Warning Flags': supported_cc_flags,
|
||||||
'docs': gen_docs,
|
'docs': gen_docs,
|
||||||
'tests': build_tests,
|
'tests': tests_enabled,
|
||||||
'DTrace': conf.has('WITH_DTRACE_PROBES'),
|
'DTrace': conf.has('WITH_DTRACE_PROBES'),
|
||||||
'firewalld': conf.has('WITH_FIREWALLD'),
|
'firewalld': conf.has('WITH_FIREWALLD'),
|
||||||
'firewalld-zone': conf.has('WITH_FIREWALLD_ZONE'),
|
'firewalld-zone': conf.has('WITH_FIREWALLD_ZONE'),
|
||||||
|
@ -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('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('docdir', type: 'string', value: '', description: 'documentation installation directory')
|
||||||
option('docs', type: 'feature', value: 'auto', description: 'whether to generate documentation')
|
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
|
# build dependencies options
|
||||||
|
@ -105,7 +105,7 @@ access_dep = declare_dependency(
|
|||||||
|
|
||||||
generated_sym_files += access_gen_sym
|
generated_sym_files += access_gen_sym
|
||||||
|
|
||||||
if build_tests[0]
|
if tests_enabled[0]
|
||||||
test(
|
test(
|
||||||
'check-aclperms',
|
'check-aclperms',
|
||||||
python3_prog,
|
python3_prog,
|
||||||
|
@ -946,7 +946,7 @@ meson.add_install_script(
|
|||||||
|
|
||||||
# Check driver files
|
# Check driver files
|
||||||
|
|
||||||
if build_tests[0]
|
if tests_enabled[0]
|
||||||
if host_machine.system() == 'linux'
|
if host_machine.system() == 'linux'
|
||||||
test(
|
test(
|
||||||
'check-symfile',
|
'check-symfile',
|
||||||
|
Loading…
Reference in New Issue
Block a user