On Wed, 10 Jun 2026 00:47, Pierrick Bouvier <[email protected]>
wrote:
We previously had list of test_plugins sources, but not the target
themselves. Create this list, so tests can then reference a plugin by
its name from there.
Signed-off-by: Pierrick Bouvier <[email protected]>
---
Reviewed-by: Manos Pitsidianakis <[email protected]>
tests/tcg/meson.build | 1 +
tests/tcg/plugins/meson.build | 11 +++++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
index b6a375e9eee..5cd80f3c030 100644
--- a/tests/tcg/meson.build
+++ b/tests/tcg/meson.build
@@ -30,6 +30,7 @@ tcg_tests = {}
# Default name is derived from src if 'exe_name' and 'test_name' are omitted.
# plugins come first, as we need to build the list
+test_plugins = {}
subdir('plugins')
# Finally, we can create all test executables and test targets
diff --git a/tests/tcg/plugins/meson.build b/tests/tcg/plugins/meson.build
index d7f8f0ae0ad..2abc317d1e7 100644
--- a/tests/tcg/plugins/meson.build
+++ b/tests/tcg/plugins/meson.build
@@ -1,4 +1,4 @@
-test_plugins = [
+test_plugins_src = [
'bb.c',
'discons.c',
'empty.c',
@@ -14,9 +14,12 @@ test_plugins = [
t = []
if get_option('plugins')
- foreach i : test_plugins
- t += shared_module(fs.stem(i), files(i),
- dependencies: plugins_deps)
+ foreach i : test_plugins_src
+ name = fs.stem(i)
+ plugin = shared_module(name, files(i),
+ dependencies: plugins_deps)
+ t += plugin
+ test_plugins += {name: plugin}
endforeach
endif
if t.length() > 0
--
2.43.0