mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 11:56:16 +01:00
16d1a3d28c
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.
31 lines
1.1 KiB
Meson
31 lines
1.1 KiB
Meson
refcount_tests = [
|
|
['closures', 'closures.c', []],
|
|
['objects', 'objects.c', []],
|
|
['objects2', 'objects2.c', [], 90],
|
|
['properties', 'properties.c', []],
|
|
['properties2', 'properties2.c', []],
|
|
['properties3', 'properties3.c', [], 90], # extra long timeout
|
|
['properties4', 'properties4.c', []],
|
|
['signal1', 'signals.c', ['-DTESTNUM=1']],
|
|
['signal2', 'signals.c', ['-DTESTNUM=2']],
|
|
['signal3', 'signals.c', ['-DTESTNUM=3']],
|
|
['signal4', 'signals.c', ['-DTESTNUM=4']],
|
|
]
|
|
|
|
foreach t : refcount_tests
|
|
test_name = t.get(0)
|
|
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,
|
|
c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
|
|
dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
|
|
install : false,
|
|
)
|
|
# FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
|
|
test(test_name, exe, env : test_env, timeout : test_timeout, suite : test_suite)
|
|
endforeach
|