Re: [libvirt PATCH 1/2] meson: Rename tests-related build options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



               -
tl;dr: ((( (_)T(_)

On a Wednesday in 2020, Andrea Bolognani wrote:
We already have two options that influence how 'ninja test'

ninja *test* [1]

behaves and we're about to introduce a third one, so it makes
sense to give them consistent names.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
libvirt.spec.in   | 2 +-
meson.build       | 6 +++---
meson_options.txt | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 379cf0d9be..90aeb6210c 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1185,7 +1185,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
           -Dqemu_group=%{qemu_group} \
           -Dtls_priority=%{tls_priority} \
           %{?enable_werror} \
-           -Dexpensive_tests=enabled \
+           -Dtests_expensive=enabled \
           -Dinit_script=systemd \
           %{?arg_login_shell}

diff --git a/meson.build b/meson.build
index 33eaa9ff56..0820e4c895 100644
--- a/meson.build
+++ b/meson.build
@@ -127,14 +127,14 @@ endif

# test options


*test* options [2]

-if get_option('expensive_tests').auto()
+if get_option('tests_expensive').auto()
  use_expensive_tests = not git
else
-  use_expensive_tests = get_option('expensive_tests').enabled()
+  use_expensive_tests = get_option('tests_expensive').enabled()
endif

coverage_flags = []
-if get_option('test_coverage')
+if get_option('tests_coverage')
  coverage_flags = [
    '-fprofile-arcs',
    '-ftest-coverage',
diff --git a/meson_options.txt b/meson_options.txt
index 7838630c1e..43ce9b83de 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -3,8 +3,8 @@ option('packager', type: 'string', value: '', description: 'Extra packager name'
option('packager_version', type: 'string', value: '', description: 'Extra packager version')
option('system', type: 'boolean', value: false, description: 'Set install paths to system ones')
option('runstatedir', type: 'string', value: '', description: 'State directory for temporary sockets, pid files, etc')
-option('expensive_tests', type: 'feature', value: 'auto', description: 'set the default for enabling expensive tests (long timeouts), use VIR_TEST_EXPENSIVE to override')
-option('test_coverage', type: 'boolean', value: false, description: 'turn on code coverage instrumentation')
+option('tests_expensive', type: 'feature', value: 'auto', description: 'set the default for enabling expensive tests (long timeouts), use VIR_TEST_EXPENSIVE to override')

VIR_*TEST*_EXPENSIVE [3]

The singular spelling seems to be popular even within the context of
this patch. And unlike its plural counterpart, it:
1) can actually be pronounced
2) involves less typing
3) 'test coverage' is actually a term https://en.wikipedia.org/wiki/Code_coverage
4) for 2/2, the timeout influences a single test, not all of them so it
   would make more sense.

Jano

+option('tests_coverage', type: 'boolean', value: false, description: 'turn on code coverage instrumentation')
option('git_werror', type: 'feature', value: 'auto', description: 'use -Werror if building from GIT')
option('rpath', type: 'feature', value: 'auto', description: 'whether to include rpath information in installed binaries and libraries')

--
2.26.2

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux