From: Anton Kuchin Date: Fri, 27 Mar 2026 16:45:51 +0000 (+0000) Subject: tests: don't build audio tests when no audio drivers are enabled X-Git-Tag: v11.0.0-rc2~6^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=425f084fd2dc9838c82eebbfdb88eab5a545ec97;p=thirdparty%2Fqemu.git tests: don't build audio tests when no audio drivers are enabled When there are no audio drivers configure fails with "ERROR: Command cannot have '@INPUT@', since no input files were specified". Fixes: 3220b38a8d ("tests: start manual audio backend test") Signed-off-by: Anton Kuchin Message-ID: [ Marc-André - use empty modinfo stub ] Reviewed-by: Marc-André Lureau --- diff --git a/tests/audio/meson.build b/tests/audio/meson.build index 84754bde221..be96313a63e 100644 --- a/tests/audio/meson.build +++ b/tests/audio/meson.build @@ -6,12 +6,14 @@ endif modinfo_dep = not_found if enable_modules - modinfo_src = custom_target('modinfo.c', - output: 'modinfo.c', - input: audio_modinfo_files, - command: [modinfo_generate, '--skip-missing-deps', '@INPUT@'], - capture: true) - + modinfo_src = 'modinfo-stub.c' + if audio_modinfo_files.length() != 0 + modinfo_src = custom_target('modinfo.c', + output: 'modinfo.c', + input: audio_modinfo_files, + command: [modinfo_generate, '--skip-missing-deps', '@INPUT@'], + capture: true) + endif modinfo_lib = static_library('modinfo.c', modinfo_src) modinfo_dep = declare_dependency(link_with: modinfo_lib) endif diff --git a/tests/audio/modinfo-stub.c b/tests/audio/modinfo-stub.c new file mode 100644 index 00000000000..1cae8c6905e --- /dev/null +++ b/tests/audio/modinfo-stub.c @@ -0,0 +1,5 @@ +#include "qemu/osdep.h" +#include "qemu/module.h" +const QemuModinfo qemu_modinfo[] = { + { /* end of list */ } +};