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.
Reviewed-by: Philippe Mathieu-Daudé <[email protected]> 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 7c20f97241f..2106f5d979e 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', ...], @@ -87,7 +88,7 @@ foreach target, plan: tcg_tests # return a clear error if user misspell a setup entry foreach key, _ : setup allowed = ['exe_name', 'env_var', 'cflags', 'gdb_test', 'plugin_test', - 'qemu_args', 'test_name'] + 'qemu_args', 'test_name', 'wrapper'] if key not in allowed error('unknown tcg setup entry \'' + key + '\' for test ' + src + ' (possible: [' + ', '.join(allowed) + '])') @@ -201,6 +202,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.47.3
