We add possibility to wrap a test command through a given script. This can be used to provide any kind of ad-hoc check for specific tests.
Signed-off-by: Pierrick Bouvier <[email protected]> --- tests/tcg/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build index aca59933d71..5380a360830 100644 --- a/tests/tcg/meson.build +++ b/tests/tcg/meson.build @@ -26,6 +26,7 @@ tcg_tests = {} # 'qemu_args': ['qemu command line flags', ...], # 'gdb_test': ['gdb test args'], # 'env_var': ['VAR=value', ...], +# 'wrapper': [program_to_launch_test, 'args'...], # 'plugin_test': { # 'plugin': 'plugin_name', # 'args': ['plugin_args', ...], @@ -85,7 +86,7 @@ foreach target, plan: tcg_tests foreach key, _ : setup if key not in ['cflags', 'qemu_args', 'gdb_test', 'exe_name', 'test_name', 'env_var', 'plugin_test', - ] + 'wrapper'] error('unknown tcg setup entry \'' + key + '\' for test ' + src) endif endforeach @@ -196,6 +197,10 @@ foreach target, plan: tcg_tests ] endif + if 'wrapper' in setup + cmd = [setup['wrapper'], cmd] + endif + # some tests expect QEMU env var to be set cmd = ['QEMU=' + qemu.full_path(), cmd] -- 2.43.0
