From ce43e84260a7d6250bf212aac958d73cfa1ca704 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 28 Sep 2023 09:53:55 +0200 Subject: Makefile: build plugins before running TCG tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add back test-plugins and, after making sure it is always defined, do so unconditionally. Reported-by: Alex Bennée Fixes: 2c13c574418 ("configure, meson: move --enable-plugins to meson", 2023-09-07) Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 2 +- tests/meson.build | 5 +---- tests/plugin/meson.build | 18 ++++++++++++------ 3 files changed, 14 insertions(+), 11 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.include b/tests/Makefile.include index 3898742..dab1989 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -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 diff --git a/tests/meson.build b/tests/meson.build index debaa45..9996a29 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -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') diff --git a/tests/plugin/meson.build b/tests/plugin/meson.build index 2bbfc4b..322cafc 100644 --- a/tests/plugin/meson.build +++ b/tests/plugin/meson.build @@ -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 -- cgit v1.1