]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: Let users know not all tests might run
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 19 Feb 2024 09:23:35 +0000 (10:23 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 19 Feb 2024 16:18:42 +0000 (17:18 +0100)
We warned users before the meson times, so do like an S Club 7 and bring
it all back.

Add the information into a new section of the summary, because even
though using `warning()` looks better, it scrolls on by once the summary
is printed.

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

index 2f3d73b93085ddb97bbd445ddf19c5e937fcd3a7..7845f60ff7e41412b2c980192f7cd62a707f2713 100644 (file)
@@ -818,6 +818,7 @@ optional_programs = [
   'tc',
 ] + optional_test_programs
 
+missing_optional_programs = []
 foreach name : optional_programs
   prog = find_program(name, required: false, dirs: libvirt_sbin_path)
   varname = name.underscorify()
@@ -825,6 +826,9 @@ foreach name : optional_programs
     prog_path = prog.full_path()
   else
     prog_path = name
+    if name in optional_test_programs
+      missing_optional_programs += [ name ]
+    endif
   endif
 
   conf.set_quoted(varname.to_upper(), prog_path)
@@ -2337,6 +2341,15 @@ devtools_summary = {
 }
 summary(devtools_summary, section: 'Developer Tools', bool_yn: true)
 
+if missing_optional_programs.length() > 0
+  missing_list = ' '.join(missing_optional_programs)
+  missing_warn = ' (some tests will be skipped!)'
+  test_programs_summary = {
+    'Missing': missing_list + missing_warn,
+  }
+  summary(test_programs_summary, section: 'Optional programs', bool_yn: true)
+endif
+
 if conf.has('WITH_QEMU')
   qemu_warn = ''
   if qemu_user == 'root'