summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-02-22 08:38:54 +0100
committerThomas Haller <thaller@redhat.com>2019-02-23 07:20:49 +0100
commitb1f6d53bc442de3fac52462bcfdf07900a89d241 (patch)
tree41df987ccc03341872f813ae9725bcb5ba92795f
parent8f62c76c0a7590535c87e6095af419e5c9dbc8c1 (diff)
downloadNetworkManager-b1f6d53bc442de3fac52462bcfdf07900a89d241.tar.gz
build/meson: increase timeouts for some tests
The defaults for test timeouts in meson is 30 seconds. That is not long enough when running $ NMTST_USE_VALGRIND=1 ninja -C build test Note that meson supports --timeout-multiplier, and automatically increases the timeout when running under valgrind. However, meson does not understand that we are running tests under valgrind via NMTST_USE_VALGRIND=1 environment variable. Timeouts are really not expected to be reached and are a mean of last resort. Hence, increasing the timeout to a large value is likely to have no effect or to fix test failures where the timeout was too rigid. It's unlikely that the test indeed hangs and the increase of timeout causes a unnecessary increase of waittime before aborting.
-rw-r--r--libnm-core/tests/meson.build1
-rw-r--r--meson.build2
-rw-r--r--src/devices/tests/meson.build1
-rw-r--r--src/devices/wifi/tests/meson.build1
-rw-r--r--src/dhcp/tests/meson.build1
-rw-r--r--src/ndisc/tests/meson.build1
-rw-r--r--src/platform/tests/meson.build20
-rw-r--r--src/settings/plugins/keyfile/tests/meson.build1
-rw-r--r--src/supplicant/tests/meson.build1
-rw-r--r--src/tests/config/meson.build1
-rw-r--r--src/tests/meson.build1
11 files changed, 21 insertions, 10 deletions
diff --git a/libnm-core/tests/meson.build b/libnm-core/tests/meson.build
index b941107432..7d772c80ce 100644
--- a/libnm-core/tests/meson.build
+++ b/libnm-core/tests/meson.build
@@ -47,5 +47,6 @@ foreach test_unit: test_units
'libnm-core/' + test_unit,
test_script,
args: test_args + [exe.full_path()],
+ timeout: default_test_timeout,
)
endforeach
diff --git a/meson.build b/meson.build
index 19926aeb12..b0dc801b98 100644
--- a/meson.build
+++ b/meson.build
@@ -98,6 +98,8 @@ set_defines = [
['VERSION', nm_version],
]
+default_test_timeout = 90
+
foreach define: set_defines
config_h.set_quoted(define[0], define[1])
endforeach
diff --git a/src/devices/tests/meson.build b/src/devices/tests/meson.build
index 11f35a0572..4702c656fc 100644
--- a/src/devices/tests/meson.build
+++ b/src/devices/tests/meson.build
@@ -14,5 +14,6 @@ foreach test_unit: test_units
'devices/' + test_unit,
test_script,
args: test_args + [exe.full_path()],
+ timeout: default_test_timeout,
)
endforeach
diff --git a/src/devices/wifi/tests/meson.build b/src/devices/wifi/tests/meson.build
index ee60f3492e..895853c4c0 100644
--- a/src/devices/wifi/tests/meson.build
+++ b/src/devices/wifi/tests/meson.build
@@ -10,4 +10,5 @@ test(
'devices/wifi/' + test_unit,
test_script,
args: test_args + [exe.full_path()],
+ timeout: default_test_timeout,
)
diff --git a/src/dhcp/tests/meson.build b/src/dhcp/tests/meson.build
index d2de4dc4f6..43b33951ca 100644
--- a/src/dhcp/tests/meson.build
+++ b/src/dhcp/tests/meson.build
@@ -14,5 +14,6 @@ foreach test_unit: test_units
'dhcp/' + test_unit,
test_script,
args: test_args + [exe.full_path()],
+ timeout: default_test_timeout,
)
endforeach
diff --git a/src/ndisc/tests/meson.build b/src/ndisc/tests/meson.build
index 0395e40616..99cf664e83 100644
--- a/src/ndisc/tests/meson.build
+++ b/src/ndisc/tests/meson.build
@@ -10,6 +10,7 @@ test(
'ndisc/' + test_unit,
test_script,
args: test_args + [exe.full_path()],
+ timeout: default_test_timeout,
)
test = 'test-ndisc-linux'
diff --git a/src/platform/tests/meson.build b/src/platform/tests/meson.build
index 7546fb4540..8086a46c9b 100644
--- a/src/platform/tests/meson.build
+++ b/src/platform/tests/meson.build
@@ -1,14 +1,14 @@
test_units = [
- ['test-link-fake', 'test-link.c', test_nm_dep_fake, 30],
- ['test-link-linux', 'test-link.c', test_nm_dep_linux, 300],
- ['test-address-fake', 'test-address.c', test_nm_dep_fake, 30],
- ['test-address-linux', 'test-address.c', test_nm_dep_linux, 30],
- ['test-general', 'test-general.c', test_nm_dep, 30],
- ['test-nmp-object', 'test-nmp-object.c', test_nm_dep, 30],
- ['test-route-fake', 'test-route.c', test_nm_dep_fake, 30],
- ['test-route-linux', 'test-route.c', test_nm_dep_linux, 30],
- ['test-cleanup-fake', 'test-cleanup.c', test_nm_dep_fake, 30],
- ['test-cleanup-linux', 'test-cleanup.c', test_nm_dep_linux, 30],
+ ['test-link-fake', 'test-link.c', test_nm_dep_fake, default_test_timeout],
+ ['test-link-linux', 'test-link.c', test_nm_dep_linux, 900],
+ ['test-address-fake', 'test-address.c', test_nm_dep_fake, default_test_timeout],
+ ['test-address-linux', 'test-address.c', test_nm_dep_linux, default_test_timeout],
+ ['test-general', 'test-general.c', test_nm_dep, default_test_timeout],
+ ['test-nmp-object', 'test-nmp-object.c', test_nm_dep, default_test_timeout],
+ ['test-route-fake', 'test-route.c', test_nm_dep_fake, default_test_timeout],
+ ['test-route-linux', 'test-route.c', test_nm_dep_linux, default_test_timeout],
+ ['test-cleanup-fake', 'test-cleanup.c', test_nm_dep_fake, default_test_timeout],
+ ['test-cleanup-linux', 'test-cleanup.c', test_nm_dep_linux, default_test_timeout],
]
foreach test_unit: test_units
diff --git a/src/settings/plugins/keyfile/tests/meson.build b/src/settings/plugins/keyfile/tests/meson.build
index 4253fe3cb8..752b6d7bd1 100644
--- a/src/settings/plugins/keyfile/tests/meson.build
+++ b/src/settings/plugins/keyfile/tests/meson.build
@@ -12,4 +12,5 @@ test(
'keyfile/' + test_unit,
test_script,
args: test_args + [exe.full_path()],
+ timeout: default_test_timeout,
)
diff --git a/src/supplicant/tests/meson.build b/src/supplicant/tests/meson.build
index 7cc9d6af4a..fbccb3134c 100644
--- a/src/supplicant/tests/meson.build
+++ b/src/supplicant/tests/meson.build
@@ -10,4 +10,5 @@ test(
'supplicant/' + test_unit,
test_script,
args: test_args + [exe.full_path()],
+ timeout: default_test_timeout,
)
diff --git a/src/tests/config/meson.build b/src/tests/config/meson.build
index dc0a022cf4..f65f90bb80 100644
--- a/src/tests/config/meson.build
+++ b/src/tests/config/meson.build
@@ -17,4 +17,5 @@ test(
'config/' + test_unit,
test_script,
args: test_args + [exe.full_path()],
+ timeout: default_test_timeout,
)
diff --git a/src/tests/meson.build b/src/tests/meson.build
index 9c51e8d423..153128f237 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -21,6 +21,7 @@ foreach test_unit: test_units
'src/' + test_unit,
test_script,
args: test_args + [exe.full_path()],
+ timeout: default_test_timeout,
)
endforeach