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:
Emmanuele Bassi
2018-06-10 15:33:06 +01:00
parent e22bffb522
commit 16d1a3d28c
5 changed files with 27 additions and 23 deletions

View File

@@ -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...

View File

@@ -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