]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Add build system variable DBUS_NAME_TEST_EXEC to cover differences in executable...
authorRalf Habacker <ralf.habacker@freenet.de>
Tue, 20 Nov 2018 15:33:57 +0000 (16:33 +0100)
committerSimon McVittie <smcv@collabora.com>
Tue, 11 Dec 2018 10:41:07 +0000 (10:41 +0000)
Autotools creates executable applications in the respective
subdirectory of the build directory, while cmake creates
them in <build-root>/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 <ralf.habacker@freenet.de>
Reviewed-by: Simon McVittie <smcv@collabora.com>
cmake/CMakeLists.txt
configure.ac
test/Makefile.am
test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in

index 884b277fda6e24179b7a70f4d1f6e5474b43d1e5..b0aa760e7cbc9d3395ddd3627ae0f78aa0b0c0e4 100644 (file)
@@ -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)
index 2d78b7cfbf873ad8f677caead0329a7e959bf6dc..5723ae48d0f02ac7a4b297bc3cc5fbd9c5314885 100644 (file)
@@ -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])
index 408cf668dcb76c0fbf86b78363d29aa5cf0ec839..baec9639607e522a2e607c61c754acc64a9b3d10 100644 (file)
@@ -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),' \
index 0fdfeade03c8ae314cf3dcb60b288f2338f8c975..788d37a1cb087911d3568dedbde8552ce4cb22af 100644 (file)
@@ -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@