[pacman-dev] [PATCH] meson: add configure-time option to run tests with valgrind
Allan McRae
allan at archlinux.org
Mon Nov 25 23:50:42 UTC 2019
On 12/11/19 4:37 pm, Eli Schwartz wrote:
> ninja doesn't support dynamic modification of commands via command-line
> defines the way Make does.
>
> Resolves a major blocker for FS#64394
It was discussed on the mailing list to instead allow pactest to detect
environmental variables to do this. That would be a better approach, as
you could decide on individual runs of the test suite whether to use
valgrind.
> Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
> ---
> meson_options.txt | 4 ++++
> test/pacman/meson.build | 3 +++
> 2 files changed, 7 insertions(+)
>
> diff --git a/meson_options.txt b/meson_options.txt
> index 4d8cc300..80d9422a 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -54,3 +54,7 @@ option('i18n', type : 'boolean', value : true,
> # tools
> option('file-seccomp', type: 'feature', value: 'auto',
> description: 'determine whether file is seccomp-enabled')
> +
> +# test options
> +option('valgrind', type : 'boolean', value : false,
> + description : 'run pacman tests using valgrind')
> diff --git a/test/pacman/meson.build b/test/pacman/meson.build
> index 4e87b4f3..2e0a2f5f 100644
> --- a/test/pacman/meson.build
> +++ b/test/pacman/meson.build
> @@ -346,6 +346,9 @@ foreach input : pacman_tests
> if not conf.get('HAVE_LIBGPGME')
> args += '--without-gpg'
> endif
> + if get_option('valgrind')
> + args += '--valgrind'
> + endif
>
> test(
> test_name,
>
More information about the pacman-dev
mailing list