diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-04-12 13:08:47 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-04-23 21:47:27 -0400 |
commit | 81efcc1c8979451e74725c97ad901a4bf5780a22 (patch) | |
tree | dc91d15cae4f0baf49a804950c4f561a60e32467 | |
parent | 8191c5948baaaf666aebb5201adb317026d28912 (diff) |
meson: specify a timeout of 90 s for tests which take a bit longer
Both test-hashmap and test-benchmark need 10-11 s here, but might time out
under load with the default meson timeout of 30 s.
-rw-r--r-- | meson.build | 9 | ||||
-rw-r--r-- | src/test/meson.build | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 7eac7b48fe..aab0e550f6 100644 --- a/meson.build +++ b/meson.build @@ -2075,8 +2075,13 @@ foreach tuple : tests type = tuple.length() >= 5 ? tuple[4] : '' defs = tuple.length() >= 6 ? tuple[5] : [] incs = tuple.length() >= 7 ? tuple[6] : includes + timeout = 30 name = sources[0].split('/')[-1].split('.')[0] + if type.startswith('timeout=') + timeout = type.split('=')[1].to_int() + type = '' + endif if condition == '' or conf.get(condition, 0) == 1 install = install_tests and type == '' @@ -2097,7 +2102,9 @@ foreach tuple : tests elif type == 'unsafe' and want_tests != 'unsafe' message('@0@ is an unsafe test'.format(name)) else - test(name, exe, env : test_env) + test(name, exe, + env : test_env, + timeout : timeout) endif else message('Not compiling @0@ because @1@ is not true'.format(name, condition)) diff --git a/src/test/meson.build b/src/test/meson.build index 26b399dfc5..234fb77475 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -340,7 +340,8 @@ tests += [ 'src/test/test-hashmap-plain.c', test_hashmap_ordered_c], [libshared], - []], + [], + '', 'timeout=90'], [['src/test/test-set.c'], [libshared], @@ -698,7 +699,8 @@ tests += [ [libjournal_core, libshared], [liblz4, - libxz]], + libxz], + '', 'timeout=90'], [['src/journal/test-audit-type.c'], [libjournal_core, |