From 06e34bbf920692828bfd816ab5fb93e7ea9c51c2 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Sun, 24 Mar 2024 19:24:24 +0000 Subject: [PATCH] Fix building when pytest is not installed Add "verbose: true" to test() when it is possible to raise minimum Meson to >= 0.62. --- meson.build | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/meson.build b/meson.build index 28bdf38d..06ea2285 100644 --- a/meson.build +++ b/meson.build @@ -144,14 +144,17 @@ custom_target('cp_confdata', build_by_default: true, ) -test('testing', - find_program('pytest', required: false), - args: ['-v', - 'fract4d', - 'fract4dgui', - 'fract4d_compiler', - 'test.py', - ], - timeout: 60, - workdir: meson.project_source_root(), -) +pytest = find_program('pytest', required: false) +if pytest.found() + test('testing', + pytest, + args: [ + 'fract4d', + 'fract4dgui', + 'fract4d_compiler', + 'test.py', + ], + timeout: 60, + workdir: meson.project_source_root(), + ) +endif