diff --git a/meson.build b/meson.build index 9edd873..ebcf2d6 100644 --- a/meson.build +++ b/meson.build @@ -102,7 +102,7 @@ test_env = environment() test_env.set('abs_top_builddir', meson.build_root()) # Most tests require a D-Bus session, so try to wrap automatically with dbus-run-session -dbus_run_session = find_program('dbus-run-session', required: false) +dbus_run_session = find_program('dbus-run-session', required: get_option('test_setup')) if dbus_run_session.found() add_test_setup('dbus', exe_wrapper: dbus_run_session, diff --git a/meson_options.txt b/meson_options.txt index 70f1c4e..d7b1628 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -61,3 +61,8 @@ option('pam', description: 'Build PAM module', ) +option('test_setup', + type: 'feature', + value: 'auto', + description: 'Automatically setup a test environment when running tests', +)