mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Classify the tests
Meson has the ability to classify tests according to "suites", a list of tags. This is especially useful when we want to run specific sets of tests — e.g. only GLib's tests — instead of the whole test suite. It also allows us to classify special tests, like "slow" ones, so that we can only run them when needed.
This commit is contained in:
@@ -48,6 +48,7 @@ foreach t : gobject_tests
|
||||
test_src = t.get(1, test_name + '.c')
|
||||
test_extra_cargs = t.get(2, [])
|
||||
test_timeout = t.get(3, 30)
|
||||
test_suite = test_timeout == 30 ? ['gobject'] : ['gobject', 'slow']
|
||||
|
||||
# FIXME? $(GLIB_DEBUG_FLAGS)
|
||||
exe = executable(test_name + '-gobject', test_src,
|
||||
@@ -56,7 +57,7 @@ foreach t : gobject_tests
|
||||
install : false,
|
||||
)
|
||||
# FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
|
||||
test(test_name, exe, env : test_env, timeout : test_timeout)
|
||||
test(test_name, exe, env : test_env, timeout : test_timeout, suite : test_suite)
|
||||
endforeach
|
||||
|
||||
# Don't install these ones, and keep them out of 'make check' because they take too long...
|
||||
|
@@ -17,6 +17,7 @@ foreach t : refcount_tests
|
||||
test_src = t.get(1)
|
||||
test_extra_cargs = t.get(2)
|
||||
test_timeout = t.get(3, 30)
|
||||
test_suite = test_timeout == 30 ? ['refcount'] : ['refcount', 'slow']
|
||||
|
||||
# FIXME? $(GLIB_DEBUG_FLAGS)
|
||||
exe = executable(test_name + '-test', test_src,
|
||||
@@ -25,5 +26,5 @@ foreach t : refcount_tests
|
||||
install : false,
|
||||
)
|
||||
# FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
|
||||
test(test_name, exe, env : test_env, timeout : test_timeout)
|
||||
test(test_name, exe, env : test_env, timeout : test_timeout, suite : test_suite)
|
||||
endforeach
|
||||
|
Reference in New Issue
Block a user