From f588a5a996f47723f11f846b5c3d511cb2caebc0 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 8 Jan 2024 16:48:15 +0100 Subject: [PATCH] meson: tests: Allow 'timeout' override for all tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko --- tests/meson.build | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index 4a4042376a..2f0b5e39b7 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -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': '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': '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') tests += [ @@ -595,17 +595,11 @@ foreach data : tests ], export_dynamic: true, ) - if data['name'] == 'qemuxml2argvtest' - timeout = 90 - else - # default meson timeout - timeout = 30 - endif test( data['name'], test_bin, env: tests_env, - timeout: timeout, + timeout: data.get('timeout', 30), depends: tests_deps, suite: 'bin' )