From e6f3921f86a8b2e66be8a33763e369850d3bf5ad Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 14 Oct 2013 22:40:31 +0200 Subject: [PATCH 6/8] Create session.conf and system.conf for test/data/valid-config-files from *.in files because we need to patch the listen address. --- cmake/CMakeLists.txt | 10 +++++----- cmake/test/CMakeLists.txt | 7 +++++-- 2 Dateien geändert, 10 Zeilen hinzugefügt(+), 7 Zeilen entfernt(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index adecfe1..bea9ab1 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -468,12 +468,12 @@ if (DBUS_BUILD_TESTS) set(DBUS_TEST_DATA ${CMAKE_BINARY_DIR}/test/data) set(TEST_SOCKET_DIR ${DBUS_SESSION_SOCKET_DIR} ) set(TEST_LAUNCH_HELPER_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-daemon-launch-helper-test) - if (UNIX) + if (WIN32 OR CROSS_COMPILING) + set (TEST_LISTEN "autolaunch:scope=*install-path") + set (TEST_CONNECT_ADDRESS "autolaunch:scope=*install-path") + else() set (TEST_LISTEN "unix:tmpdir=${TEST_SOCKET_DIR}") - endif (UNIX) - if (WIN32) - set (TEST_LISTEN "tcp:host=localhost") - endif (WIN32) + endif() endif (DBUS_BUILD_TESTS) set(DBUS_LIBRARIES dbus-1) diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt index 694d931..a231e92 100644 --- a/cmake/test/CMakeLists.txt +++ b/cmake/test/CMakeLists.txt @@ -2,6 +2,8 @@ project(test) add_definitions(${DBUS_INTERNAL_CLIENT_DEFINITIONS}) +set(DBUS_SESSION_BUS_LISTEN_ADDRESS ${TEST_LISTEN}) + add_library(dbus-testutils STATIC ${CMAKE_SOURCE_DIR}/../test/test-utils.h ${CMAKE_SOURCE_DIR}/../test/test-utils.c @@ -150,12 +152,13 @@ ENDFOREACH(FILE_TYPE) MESSAGE(STATUS "Copying generated bus config files to test directory") set (OUTDIR ${CMAKE_BINARY_DIR}/test/data/valid-config-files) -FILE(GLOB FILES "${CMAKE_BINARY_DIR}/bus/*.conf" ) +FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../bus/*.conf.in" ) FILE(MAKE_DIRECTORY ${OUTDIR}) FOREACH(FILE ${FILES}) GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME) + STRING(REGEX REPLACE "\\.in$" "" FILENAME ${FILENAME}) SET (TARGET ${OUTDIR}/${FILENAME}) - configure_file(${FILE} ${TARGET} COPYONLY) + configure_file(${FILE} ${TARGET} @ONLY) IF (CONFIG_VERBOSE) MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n") ENDIF (CONFIG_VERBOSE) -- 1.7.10.4