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

Ján Tomko jtomko at redhat.com
Wed Jul 22 09:25:07 UTC 2020


On a Wednesday in 2020, Peter Krempa wrote:
>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.
>

If the point of this is just to silently eat the command line option,
I'd say just drop it. Maintainers and users will have to adjust anyway.

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200722/f4632b0e/attachment-0001.sig>


More information about the libvir-list mailing list