Skip to content
Snippets Groups Projects
Commit 2e2b1a43 authored by Simon McVittie's avatar Simon McVittie
Browse files

tests: Wrap in dbus-run-session if available


This lets us use the D-Bus session bus without interfering with user
processes, even on CI systems that weren't already running one.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent e6b3004d
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment