Commit b60cd325 authored by Ralf Habacker's avatar Ralf Habacker

Add cmake support for session based test executables

This patch introduces a new cmake macro add_session_test_executable,
which uses dbus-run-session to start a dbus-daemon process with a
temporary session bus in the background and the desired client file.

add_session_test_executable requires additional environment variables
defined in the top level CMakeLists.txt.

Bug: #135Signed-off-by: Ralf Habacker's avatarRalf Habacker <ralf.habacker@freenet.de>
parent 578ea41d
......@@ -488,7 +488,7 @@ if (DBUS_BUILD_TESTS)
set(DBUS_TEST_DAEMON ${Z_DRIVE_IF_WINE}${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dbus-daemon${EXEEXT})
set(DBUS_TEST_DBUS_LAUNCH ${Z_DRIVE_IF_WINE}${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dbus-launch${EXEEXT})
set(DBUS_TEST_HOMEDIR ${Z_DRIVE_IF_WINE}${CMAKE_BINARY_DIR}/dbus)
set(DBUS_TEST_RUN_SESSION ${Z_DRIVE_IF_WINE}${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dbus-run-session${EXEEXT}
set(DBUS_TEST_RUN_SESSION ${Z_DRIVE_IF_WINE}${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dbus-run-session${EXEEXT})
set(TEST_LAUNCH_HELPER_BINARY ${Z_DRIVE_IF_WINE}${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dbus-daemon-launch-helper-test${EXEEXT})
if (UNIX)
set(TEST_SOCKET_DIR ${DBUS_SESSION_SOCKET_DIR})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment