]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Rename build_tests -> tests_enabled
authorAndrea Bolognani <abologna@redhat.com>
Tue, 3 Oct 2023 13:39:02 +0000 (15:39 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 26 Oct 2023 09:31:25 +0000 (11:31 +0200)
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>
build-aux/meson.build
docs/html/meson.build
docs/meson.build
meson.build
meson_options.txt
src/access/meson.build
src/meson.build

index 84405c5ec85c75472318af47ec3fcb6a08b3f08c..f96d46c4454a4eec1a8baef8e19c33ce61e5e4f6 100644 (file)
@@ -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()
index b4e81f8501885d617404f637d4b4e92b486807e7..e2758ed177ab358f594bcb9ab4a97c061360e367 100644 (file)
@@ -119,7 +119,7 @@ html_xslt_gen = []
 
 # --- end of XSLT processing ---
 
-if build_tests[0]
+if tests_enabled[0]
   test(
     'check-html',
     xmllint_prog,
index 52763a859716ee44412065afab3df9fc24cfb7e8..87d728213c8210c85c3a4aed1a8d9f96e70b564f 100644 (file)
@@ -351,7 +351,7 @@ run_target(
   depends: install_web_deps,
 )
 
-if build_tests[0]
+if tests_enabled[0]
   test(
     'check-html-references',
     python3_prog,
index b30150d605a3d9daed2723511b33284fff91c9c9..e51ba9231ec21d8d9ac272cffeea1427cfbd2889 100644 (file)
@@ -2027,8 +2027,8 @@ conf.set_quoted('TLS_PRIORITY', get_option('tls_priority'))
 
 # 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'
@@ -2039,14 +2039,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
@@ -2083,7 +2083,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
@@ -2307,7 +2307,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'),
index 7c428a9eb0325f0c7b333fbf3af9e245b8562327..a0928102bfee30f66bd851fee0401bf5c2324e09 100644 (file)
@@ -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
index 6ca953c932e02fa71f6134ae488f9e7719f68134..fc5ba5b342561e4ed37063c090acf7eedc74446e 100644 (file)
@@ -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,
index e25b3e5980b5725c197b8dd2be94504d72b7166d..5fc4d03b4a5fe26f449d046bbb3051f0e477cd9f 100644 (file)
@@ -946,7 +946,7 @@ meson.add_install_script(
 
 # Check driver files
 
-if build_tests[0]
+if tests_enabled[0]
   if host_machine.system() == 'linux'
     test(
       'check-symfile',