meson: tests: Allow 'timeout' override for all tests

Don't special-case qemuxml2argvtest's handling of timeout but rather
allow each test array entry to have it's own.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2024-01-08 16:48:15 +01:00
parent a61230ef26
commit f588a5a996

View File

@ -455,7 +455,7 @@ if conf.has('WITH_QEMU')
{ 'name': 'qemusecuritytest', 'sources': [ 'qemusecuritytest.c', 'qemusecuritymock.c' ], 'link_with': [ test_qemu_driver_lib ], 'link_whole': [ test_utils_qemu_lib ] }, { 'name': 'qemusecuritytest', 'sources': [ 'qemusecuritytest.c', 'qemusecuritymock.c' ], 'link_with': [ test_qemu_driver_lib ], 'link_whole': [ test_utils_qemu_lib ] },
{ 'name': 'qemuxmlactivetest', 'link_with': [ test_qemu_driver_lib ], 'link_whole': [ test_utils_qemu_lib, test_file_wrapper_lib ] }, { 'name': 'qemuxmlactivetest', 'link_with': [ test_qemu_driver_lib ], 'link_whole': [ test_utils_qemu_lib, test_file_wrapper_lib ] },
{ 'name': 'qemuvhostusertest', 'link_with': [ test_qemu_driver_lib ], 'link_whole': [ test_file_wrapper_lib ] }, { 'name': 'qemuvhostusertest', 'link_with': [ test_qemu_driver_lib ], 'link_whole': [ test_file_wrapper_lib ] },
{ 'name': 'qemuxml2argvtest', 'link_with': [ test_qemu_driver_lib, test_utils_qemu_monitor_lib ], 'link_whole': [ test_utils_qemu_lib, test_file_wrapper_lib ] }, { 'name': 'qemuxml2argvtest', 'timeout': 90, 'link_with': [ test_qemu_driver_lib, test_utils_qemu_monitor_lib ], 'link_whole': [ test_utils_qemu_lib, test_file_wrapper_lib ] },
] ]
if conf.has('WITH_NBDKIT') if conf.has('WITH_NBDKIT')
tests += [ tests += [
@ -595,17 +595,11 @@ foreach data : tests
], ],
export_dynamic: true, export_dynamic: true,
) )
if data['name'] == 'qemuxml2argvtest'
timeout = 90
else
# default meson timeout
timeout = 30
endif
test( test(
data['name'], data['name'],
test_bin, test_bin,
env: tests_env, env: tests_env,
timeout: timeout, timeout: data.get('timeout', 30),
depends: tests_deps, depends: tests_deps,
suite: 'bin' suite: 'bin'
) )