aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-03-12 21:41:48 +0000
committerSam James <sam@gentoo.org>2024-03-12 21:41:48 +0000
commit988e47557368df49035eeba94beca893f7b267c1 (patch)
tree8026eded5123fb97e25ae0fc8882d5ab232e5eb9
parentswitch test framework to pytest (diff)
downloadgentoolkit-988e47557368df49035eeba94beca893f7b267c1.tar.gz
gentoolkit-988e47557368df49035eeba94beca893f7b267c1.tar.bz2
gentoolkit-988e47557368df49035eeba94beca893f7b267c1.zip
meson: make tests optional
Closes: https://bugs.gentoo.org/926427 Signed-off-by: Greg Kubaryk <greg.kubaryk@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--meson.build6
-rw-r--r--meson_options.txt4
2 files changed, 8 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index c3e83c5..b7b07c1 100644
--- a/meson.build
+++ b/meson.build
@@ -39,8 +39,10 @@ endif
subdir('bin')
subdir('pym')
-pytest = find_program('pytest')
-test('pytest', pytest, args : ['-v', meson.current_source_dir() / 'pym'])
+if get_option('tests')
+ pytest = find_program('pytest')
+ test('pytest', pytest, args : ['-v', meson.current_source_dir() / 'pym'])
+endif
if get_option('code-only')
subdir_done()
diff --git a/meson_options.txt b/meson_options.txt
index 265d572..9949cbf 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -13,3 +13,7 @@ option('eprefix', type : 'string',
option('docdir', type : 'string',
description : 'Documentation directory'
)
+
+option('tests', type : 'boolean', value: false,
+ description : 'Enable tests'
+)