[pacman-dev] [PATCH] meson: add configure-time option to run tests with valgrind
Eli Schwartz
eschwartz at archlinux.org
Tue Nov 12 06:37:22 UTC 2019
ninja doesn't support dynamic modification of commands via command-line
defines the way Make does.
Resolves a major blocker for FS#64394
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,
--
2.24.0
More information about the pacman-dev
mailing list