diff --git a/meson.build b/meson.build index 78edcb1e5b1db960329fca5efdaaaff8b3ff4da4..410829da280e9cee2ee0da9dd70a13e4a4464b64 100644 --- a/meson.build +++ b/meson.build @@ -32,6 +32,8 @@ project( ) gnome = import('gnome') + +dbus_run_session = find_program('dbus-run-session', required : false) prove = find_program('prove', required : false) sh = find_program('sh', required : true) diff --git a/tests/meson.build b/tests/meson.build index fb6758ae7457f6be7992695f35cfd7cc2077125f..7cf3dfdb5f9ba6d56dc3c29f417846dd65c58743 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -95,12 +95,21 @@ foreach test_name : tests endif if prove.found() - test( - test_name, prove, - args : test_args, - env : test_env, - timeout : timeout, - ) + if dbus_run_session.found() + test( + test_name, dbus_run_session, + args : ['--', 'prove'] + test_args, + env : test_env, + timeout : timeout, + ) + else + test( + test_name, prove, + args : test_args, + env : test_env, + timeout : timeout, + ) + endif endif endforeach