From: Ralf Habacker Date: Tue, 20 Nov 2018 15:33:57 +0000 (+0100) Subject: Add build system variable DBUS_NAME_TEST_EXEC to cover differences in executable... X-Git-Tag: dbus-1.13.10~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d9de6ab21319c848147c0c0891a01cf5f801b9a2;p=thirdparty%2Fdbus.git Add build system variable DBUS_NAME_TEST_EXEC to cover differences in executable paths Autotools creates executable applications in the respective subdirectory of the build directory, while cmake creates them in /bin. This leads to different paths in the file created from org.freedesktop.DBus.TestSuite.PrivServer.service.in, which are fixed by the new variable. Bug: https://gitlab.freedesktop.org/dbus/dbus/issues/135 Signed-off-by: Ralf Habacker Reviewed-by: Simon McVittie --- diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 884b277fd..b0aa760e7 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -483,6 +483,7 @@ add_definitions(${DBUS_BUS_CFLAGS}) if (DBUS_BUILD_TESTS) # set variables used for the .in files (substituted by configure_file) in test/data: set(DBUS_TEST_EXEC ${Z_DRIVE_IF_WINE}${EXECUTABLE_OUTPUT_PATH}${IDE_BIN}) + set(DBUS_NAME_TEST_EXEC ${DBUS_TEST_EXEC}) set(DBUS_TEST_DATA ${Z_DRIVE_IF_WINE}${CMAKE_BINARY_DIR}/test/data) set(TEST_LAUNCH_HELPER_BINARY ${Z_DRIVE_IF_WINE}${EXECUTABLE_OUTPUT_PATH}/dbus-daemon-launch-helper-test) if (UNIX) diff --git a/configure.ac b/configure.ac index 2d78b7cfb..5723ae48d 100644 --- a/configure.ac +++ b/configure.ac @@ -1553,10 +1553,12 @@ AC_ARG_WITH(dbus-test-dir, AS_HELP_STRING([--with-dbus-test-dir=[dirname]],[path DBUS_PWD=$withval) DBUS_TEST_EXEC="$DBUS_PWD/test" +DBUS_NAME_TEST_EXEC="$DBUS_PWD/test/name-test" DBUS_TEST_DATA="$DBUS_PWD/test/data" AC_SUBST([DBUS_TEST_DATA]) AC_SUBST([DBUS_TEST_EXEC]) +AC_SUBST([DBUS_NAME_TEST_EXEC]) AC_DEFINE_UNQUOTED([DBUS_EXEEXT], ["$EXEEXT"], [Extension for executables, typically empty or .exe]) diff --git a/test/Makefile.am b/test/Makefile.am index 408cf668d..baec96396 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -611,6 +611,7 @@ uninstalled-config-local: sed \ -e 's,[@]DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL[@],$(DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL),' \ -e 's,[@]DBUS_SESSION_BUS_LISTEN_ADDRESS[@],$(DBUS_SESSION_BUS_LISTEN_ADDRESS),' \ + -e 's,[@]DBUS_NAME_TEST_EXEC[@],$(DBUS_NAME_TEST_EXEC),' \ -e 's,[@]DBUS_TEST_DATA[@],@abs_builddir@/data,' \ -e 's,[@]DBUS_TEST_EXEC[@],@abs_builddir@,' \ -e 's,[@]DBUS_USER[@],$(DBUS_USER),' \ @@ -628,6 +629,7 @@ if DBUS_ENABLE_INSTALLED_TESTS sed \ -e 's,[@]DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL[@],$(DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL),' \ -e 's,[@]DBUS_SESSION_BUS_LISTEN_ADDRESS[@],$(DBUS_SESSION_BUS_LISTEN_ADDRESS),' \ + -e 's,[@]DBUS_NAME_TEST_EXEC[@],$(DBUS_NAME_TEST_EXEC),' \ -e 's,[@]DBUS_TEST_DATA[@],$(testexecdir)/data,' \ -e 's,[@]DBUS_TEST_EXEC[@],$(testexecdir),' \ -e 's,[@]DBUS_USER[@],$(DBUS_USER),' \ diff --git a/test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in b/test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in index 0fdfeade0..788d37a1c 100644 --- a/test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in +++ b/test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuite.PrivServer -Exec=@DBUS_TEST_EXEC@/name-test/test-privserver@EXEEXT@ +Exec=@DBUS_NAME_TEST_EXEC@/test-privserver@EXEEXT@