From: Andrea Bolognani Date: Tue, 3 Oct 2023 12:53:08 +0000 (+0200) Subject: meson: Make -Dexpensive_tests depend on -Dtests X-Git-Tag: v9.9.0-rc1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ce0decc372051d616018f57ae268e2f03082eec;p=thirdparty%2Flibvirt.git meson: Make -Dexpensive_tests depend on -Dtests It only makes sense to enable expensive tests when tests are enabled. Disallow invalid configurations. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik Reviewed-by: Martin Kletzander --- diff --git a/meson.build b/meson.build index ea8ee84ba0..33027404f6 100644 --- a/meson.build +++ b/meson.build @@ -2043,9 +2043,12 @@ if build_tests[0] and \ endif if get_option('expensive_tests').auto() - use_expensive_tests = not git + use_expensive_tests = not git and build_tests[0] else use_expensive_tests = get_option('expensive_tests').enabled() + if use_expensive_tests and not build_tests[0] + error('cannot enable expensive tests when tests are disabled') + endif endif coverage_flags = []