[glib: 1/4] meson: Centralize test timeout values



commit 13e206aaeba21e3db4d466a55df0a865589baa59
Author: Simon McVittie <smcv collabora com>
Date:   Thu Nov 1 09:35:17 2018 +0000

    meson: Centralize test timeout values
    
    Signed-off-by: Simon McVittie <smcv collabora com>

 gio/tests/meson.build      | 2 +-
 glib/tests/meson.build     | 2 +-
 gobject/tests/meson.build  | 2 +-
 meson.build                | 2 ++
 tests/gobject/meson.build  | 2 +-
 tests/meson.build          | 2 +-
 tests/refcount/meson.build | 2 +-
 7 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index 757516b46..b71f61704 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -493,7 +493,7 @@ foreach test_name, extra_args : gio_tests
   )
 
   suite = ['gio'] + extra_args.get('suite', [])
-  timeout = suite.contains('slow') ? 120 : 30
+  timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
   test(test_name, exe,
     env : test_env,
     timeout : timeout,
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
index b020cc90d..af32fc637 100644
--- a/glib/tests/meson.build
+++ b/glib/tests/meson.build
@@ -188,7 +188,7 @@ foreach test_name, extra_args : glib_tests
   )
 
   suite = ['glib'] + extra_args.get('suite', [])
-  timeout = suite.contains('slow') ? 120 : 30
+  timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
   test(test_name, exe, env : test_env, timeout : timeout, suite : suite,
     args : ['--tap'])
 endforeach
diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build
index 124f4923e..51571c076 100644
--- a/gobject/tests/meson.build
+++ b/gobject/tests/meson.build
@@ -89,7 +89,7 @@ foreach test_name, extra_args : gobject_tests
   )
 
   suite = ['gobject'] + extra_args.get('suite', [])
-  timeout = suite.contains('slow') ? 120 : 30
+  timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
   test(test_name, exe, env : test_env, timeout : timeout, suite : suite,
     args: ['--tap'])
 endforeach
diff --git a/meson.build b/meson.build
index e642ae227..89ba2567b 100644
--- a/meson.build
+++ b/meson.build
@@ -1972,6 +1972,8 @@ if want_systemtap and enable_dtrace
   enable_systemtap = true
 endif
 
+test_timeout = 30
+test_timeout_slow = 120
 
 pkg = import('pkgconfig')
 windows = import('windows')
diff --git a/tests/gobject/meson.build b/tests/gobject/meson.build
index a79a9f79e..4b1c69085 100644
--- a/tests/gobject/meson.build
+++ b/tests/gobject/meson.build
@@ -83,7 +83,7 @@ foreach test_name, extra_args : gobject_tests
   )
 
   suite = ['gobject'] + extra_args.get('suite', [])
-  timeout = suite.contains('slow') ? 120 : 30
+  timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
   # FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
   test(test_name, exe, env : test_env, timeout : timeout, suite : suite,
     args : test_command_args)
diff --git a/tests/meson.build b/tests/meson.build
index 68e0431e9..8dcb712e4 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -124,7 +124,7 @@ foreach test_name, extra_args : tests
   )
 
   suite = ['glib'] + extra_args.get('suite', [])
-  timeout = suite.contains('slow') ? 120 : 30
+  timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
   # FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
   test(test_name, exe, env : test_env, timeout : timeout, suite : suite,
     args : test_command_args)
diff --git a/tests/refcount/meson.build b/tests/refcount/meson.build
index 3a2072d08..68c23cc41 100644
--- a/tests/refcount/meson.build
+++ b/tests/refcount/meson.build
@@ -53,7 +53,7 @@ foreach test_name, extra_args : refcount_tests
   )
 
   suite = ['refcount'] + extra_args.get('suite', [])
-  timeout = suite.contains('slow') ? 120 : 30
+  timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
   # FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
   test(test_name, exe, env : test_env, timeout : timeout, suite : suite)
 endforeach


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]