testsuite: Use catch as testwrapper

If we find a binary named catch, use it as test wrapper. This
will be used to capture stacktraces for crashes in ci.
This commit is contained in:
Matthias Clasen 2024-07-01 22:09:35 -04:00
parent a35f9102f2
commit b6e79a7234

View File

@ -2,6 +2,12 @@ gtk_libexecdir = join_paths(gtk_prefix, get_option('libexecdir'))
installed_test_bindir = join_paths(gtk_libexecdir, 'installed-tests', 'gtk-4.0')
installed_test_datadir = join_paths(gtk_datadir, 'installed-tests', 'gtk-4.0')
test_wrappers = []
catch = find_program('catch', required: false)
if catch.found()
test_wrappers += [ catch ]
endif
common_env = [
'GIO_USE_VOLUME_MONITOR=unix',
'GIO_USE_VFS=local',
@ -56,12 +62,14 @@ foreach setup : setups
env: env + ['TEST_OUTPUT_SUBDIR=@0@'.format(name)],
exclude_suites: exclude_unstable + exclude,
is_default: setup.get('is_default', false),
exe_wrapper: test_wrappers,
)
add_test_setup(
'@0@_unstable'.format(name),
env: env + ['TEST_OUTPUT_SUBDIR=@0@_unstable'.format(name)],
exclude_suites: exclude,
exe_wrapper: test_wrappers,
)
endif
endforeach