]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: tests: Allow 'timeout' override for all tests
authorPeter Krempa <pkrempa@redhat.com>
Mon, 8 Jan 2024 15:48:15 +0000 (16:48 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 17 Jan 2024 16:31:12 +0000 (17:31 +0100)
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>
tests/meson.build

index 4a4042376ad241cf0b64a62758086a1ab4862228..2f0b5e39b70dff8675d3f3f2a1aef32d4e046cf0 100644 (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': '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'
   )