From: Simon McVittie Date: Tue, 11 Dec 2018 11:52:38 +0000 (+0000) Subject: test-privserver: Move helper executable out of name-test/ X-Git-Tag: dbus-1.13.10~39^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9490e954d0cce75f5c1aad10b6b3c67f5c4a082e;p=thirdparty%2Fdbus.git test-privserver: Move helper executable out of name-test/ This means we don't need to distinguish between DBUS_NAME_TEST_EXEC and DBUS_TEST_EXEC any more, because all test helper executables are in the same place, both during build and when installed (we don't install test-privserver since no installed test requires it yet, but in principle we could). Signed-off-by: Simon McVittie --- diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index b0aa760e7..884b277fd 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -483,7 +483,6 @@ 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/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt index dc83f7724..b505cc617 100644 --- a/cmake/test/CMakeLists.txt +++ b/cmake/test/CMakeLists.txt @@ -74,6 +74,7 @@ add_helper_executable(test-service ${test-service_SOURCES} dbus-testutils) add_helper_executable(test-names ${test-names_SOURCES} dbus-testutils) add_test_executable(test-shell ${test-shell_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) add_test_executable(test-printf ${TEST_DIR}/internals/printf.c dbus-testutils) +add_helper_executable(test-privserver ${TEST_DIR}/test-privserver.c dbus-testutils) add_helper_executable(test-shell-service ${test-shell-service_SOURCES} dbus-testutils) add_helper_executable(test-spawn ${test-spawn_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) add_helper_executable(test-exit ${test-exit_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) diff --git a/cmake/test/name-test/CMakeLists.txt b/cmake/test/name-test/CMakeLists.txt index 029b69176..338720dfa 100644 --- a/cmake/test/name-test/CMakeLists.txt +++ b/cmake/test/name-test/CMakeLists.txt @@ -9,7 +9,6 @@ add_helper_executable(test-pending-call-timeout ${NAME_TEST_DIR}/test-pending-ca add_helper_executable(test-thread-init ${NAME_TEST_DIR}/test-threads-init.c ${DBUS_INTERNAL_LIBRARIES}) add_helper_executable(test-ids ${NAME_TEST_DIR}/test-ids.c ${DBUS_INTERNAL_LIBRARIES}) add_helper_executable(test-shutdown ${NAME_TEST_DIR}/test-shutdown.c dbus-testutils) -add_helper_executable(test-privserver ${NAME_TEST_DIR}/test-privserver.c dbus-testutils) add_helper_executable(test-privserver-client ${NAME_TEST_DIR}/test-privserver-client.c dbus-testutils) add_helper_executable(test-autolaunch ${NAME_TEST_DIR}/test-autolaunch.c dbus-testutils) endif (DBUS_ENABLE_EMBEDDED_TESTS) diff --git a/configure.ac b/configure.ac index 4636062ab..bdd82d460 100644 --- a/configure.ac +++ b/configure.ac @@ -1556,12 +1556,10 @@ 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/.gitignore b/test/.gitignore index 4eaae4a4e..597dbc60e 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -33,6 +33,7 @@ manual-dir-iter manual-tcp test-dbus-daemon-eavesdrop test-printf +/test-privserver test-refs test-syntax test-syslog diff --git a/test/Makefile.am b/test/Makefile.am index b8df15acd..1e7c2db44 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -66,6 +66,7 @@ TEST_BINARIES = \ test-spawn \ test-exit \ test-names \ + test-privserver \ test-segfault \ test-shell-service \ $(NULL) @@ -100,6 +101,7 @@ test_segfault_CFLAGS = test_service_LDADD = libdbus-testutils.la test_names_LDADD = libdbus-testutils.la +test_privserver_LDADD = libdbus-testutils.la ## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la test_shell_service_LDADD = libdbus-testutils.la test_shell_SOURCES = shell-test.c @@ -626,7 +628,6 @@ 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),' \ @@ -644,7 +645,6 @@ 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 788d37a1c..e2ac080be 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_NAME_TEST_EXEC@/test-privserver@EXEEXT@ +Exec=@DBUS_TEST_EXEC@/test-privserver@EXEEXT@ diff --git a/test/name-test/.gitignore b/test/name-test/.gitignore index 2bf313a5f..0ecde2f2c 100644 --- a/test/name-test/.gitignore +++ b/test/name-test/.gitignore @@ -8,7 +8,6 @@ test-ids test-names test-pending-call-dispatch test-pending-call-timeout -test-privserver test-privserver-client test-shutdown test-threads-init diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am index 280eb8ea0..37d1472d6 100644 --- a/test/name-test/Makefile.am +++ b/test/name-test/Makefile.am @@ -66,7 +66,7 @@ if DBUS_ENABLE_EMBEDDED_TESTS ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we ## build even when not doing "make check" -noinst_PROGRAMS=test-pending-call-dispatch test-pending-call-timeout test-pending-call-disconnected test-threads-init test-ids test-shutdown test-privserver test-privserver-client test-autolaunch +noinst_PROGRAMS=test-pending-call-dispatch test-pending-call-timeout test-pending-call-disconnected test-threads-init test-ids test-shutdown test-privserver-client test-autolaunch test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-1.la test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-1.la @@ -75,7 +75,6 @@ test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-1.la test_ids_LDADD=$(top_builddir)/dbus/libdbus-1.la test_shutdown_LDADD=../libdbus-testutils.la -test_privserver_LDADD=../libdbus-testutils.la test_privserver_client_LDADD=../libdbus-testutils.la test_autolaunch_LDADD=../libdbus-testutils.la diff --git a/test/name-test/test-privserver.c b/test/test-privserver.c similarity index 99% rename from test/name-test/test-privserver.c rename to test/test-privserver.c index 58eca1e90..3c512d99a 100644 --- a/test/name-test/test-privserver.c +++ b/test/test-privserver.c @@ -27,7 +27,7 @@ #include #include -#include "../test-utils.h" +#include "test-utils.h" static void die (const char *message, ...) _DBUS_GNUC_NORETURN _DBUS_GNUC_PRINTF (1, 2);