[libvirt PATCH 016/351] meson: add test_suite build option

Peter Krempa pkrempa at redhat.com
Wed Jul 22 07:54:15 UTC 2020


On Thu, Jul 16, 2020 at 11:54:12 +0200, Pavel Hrdina wrote:
> With autoconf this option controlled if the test suite is compiled by
> default or not with the fact that it will be compiled later when
> running `make check`.
> 
> With meson it is not possible to compile it later when running
> `ninja test` as it will be always compiled if referenced by `test()`
> function in meson.build files. Because of that enable the test suite
> be default.
> 
> Enabling it only when compiling from git makes the test suite disabled
> for `ninja dist` command which builds the code from non-git location.
> Since that command is closest equivalent of `make distcheck` which runs
> the test suite.
> 
> The only drawback from the autoconf state is that users compiling
> libvirt from tarball will compile the test suite as well even though
> they will not run it in most cases.
> 
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
>  configure.ac      | 17 -----------------
>  meson.build       |  5 +++++
>  meson_options.txt |  1 +
>  3 files changed, 6 insertions(+), 17 deletions(-)

[...]

> diff --git a/meson_options.txt b/meson_options.txt
> index 2281faec429..6973b9f6587 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -3,3 +3,4 @@ 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('test_suite', type: 'boolean', value: true, description: 'Whether to enable and build test suite by default')

Given that you've said that the testsuite is always build, the
description is misleadingly noting that it can be avoided.




More information about the libvir-list mailing list