diff --git a/meson.build b/meson.build index 739b249a8..cce2d74db 100644 --- a/meson.build +++ b/meson.build @@ -353,8 +353,16 @@ if have_tests meta_dbus_runner = find_program('src/tests/meta-dbus-runner.py') default_test_wrappers = [ meta_dbus_runner, + '--', ] + if get_option('catch') + catch = find_program('catch') + default_test_wrappers += [ + catch, + ] + endif + add_test_setup('default', is_default: true, exe_wrapper: default_test_wrappers, diff --git a/meson_options.txt b/meson_options.txt index da755393c..61b99d9e0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -206,3 +206,9 @@ option('xwayland_initfd', value: 'auto', description: 'Whether -initfd argument is passed to Xwayland to guarantee services (e.g. gsd-xsettings) startup before applications' ) + +option('catch', + type: 'boolean', + value: false, + description: 'Use catch to catch backtraces' +) diff --git a/src/tests/kvm/meson.build b/src/tests/kvm/meson.build index 247bdf357..973a417ab 100644 --- a/src/tests/kvm/meson.build +++ b/src/tests/kvm/meson.build @@ -27,6 +27,12 @@ endif virtme_run = find_program('virtme-run.sh') +if get_option('catch') + kvm_wrapper = catch.full_path() +else + kvm_wrapper = [] +endif + foreach test_case: privileged_tests vm_env_entries = [] foreach name, value: test_case['variables'] @@ -47,6 +53,7 @@ foreach test_case: privileged_tests '--kvm', meson.current_build_dir(), vm_env, + kvm_wrapper, test_case['executable'].full_path(), ], is_parallel: false,