]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Make -Dexpensive_tests depend on -Dtests
authorAndrea Bolognani <abologna@redhat.com>
Tue, 3 Oct 2023 12:53:08 +0000 (14:53 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 26 Oct 2023 09:31:22 +0000 (11:31 +0200)
It only makes sense to enable expensive tests when tests are
enabled. Disallow invalid configurations.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
meson.build

index ea8ee84ba0a8985d0d40e2a41c8eca56ceb8e6e1..33027404f644be646f9d3ebd01a9f7cca052daf6 100644 (file)
@@ -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 = []