Makefile: build plugins before running TCG tests
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 28 Sep 2023 07:53:55 +0000 (09:53 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Oct 2023 16:04:39 +0000 (18:04 +0200)
Add back test-plugins and, after making sure it is always defined,
do so unconditionally.

Reported-by: Alex Bennée <alex.bennee@linaro.org>
Fixes: 2c13c574418 ("configure, meson: move --enable-plugins to meson", 2023-09-07)
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/Makefile.include
tests/meson.build
tests/plugin/meson.build

index 389874265944623b616cb394c3c7982ecc8a81f6..dab1989a07103b1c589546e73b6a15bed5b4f9ae 100644 (file)
@@ -73,7 +73,7 @@ $(TCG_TESTS_TARGETS:%=distclean-tcg-tests-%): distclean-tcg-tests-%:
 build-tcg: $(BUILD_TCG_TARGET_RULES)
 
 .PHONY: check-tcg
-.ninja-goals.check-tcg = all
+.ninja-goals.check-tcg = all test-plugins
 check-tcg: $(RUN_TCG_TARGET_RULES)
 
 .PHONY: clean-tcg
index debaa4505eb700e0be893e5ccff8e1e3f5f4647d..9996a293fbb5e95b6e20cf113b92042ff6fa420f 100644 (file)
@@ -80,10 +80,7 @@ if 'CONFIG_TCG' in config_all
   subdir('fp')
 endif
 
-if get_option('plugins')
-  subdir('plugin')
-endif
-
+subdir('plugin')
 subdir('unit')
 subdir('qapi-schema')
 subdir('qtest')
index 2bbfc4b19e1ee59b6affa6aa40b0f96d157d4a68..322cafcdf6bebfefbbcefab7f67ff8a0d448922a 100644 (file)
@@ -1,7 +1,13 @@
 t = []
-foreach i : ['bb', 'empty', 'insn', 'mem', 'syscall']
-  t += shared_module(i, files(i + '.c'),
-                     include_directories: '../../include/qemu',
-                     dependencies: glib)
-endforeach
-alias_target('test-plugins', t)
+if get_option('plugins')
+  foreach i : ['bb', 'empty', 'insn', 'mem', 'syscall']
+    t += shared_module(i, files(i + '.c'),
+                       include_directories: '../../include/qemu',
+                       dependencies: glib)
+  endforeach
+endif
+if t.length() > 0
+  alias_target('test-plugins', t)
+else
+  run_target('test-plugins', command: find_program('true'))
+endif