summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-12-11 11:52:38 +0000
committerSimon McVittie <smcv@collabora.com>2018-12-13 13:08:00 +0000
commit9490e954d0cce75f5c1aad10b6b3c67f5c4a082e (patch)
tree4726f16d4719fb0a9a52706c614a808387f0ab8a
parent0d79fa68c066e5b38b310be3066d22c813561d43 (diff)
downloaddbus-9490e954d0cce75f5c1aad10b6b3c67f5c4a082e.tar.gz
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 <smcv@collabora.com>
-rw-r--r--cmake/CMakeLists.txt1
-rw-r--r--cmake/test/CMakeLists.txt1
-rw-r--r--cmake/test/name-test/CMakeLists.txt1
-rw-r--r--configure.ac2
-rw-r--r--test/.gitignore1
-rw-r--r--test/Makefile.am4
-rw-r--r--test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in2
-rw-r--r--test/name-test/.gitignore1
-rw-r--r--test/name-test/Makefile.am3
-rw-r--r--test/test-privserver.c (renamed from test/name-test/test-privserver.c)2
10 files changed, 7 insertions, 11 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index b0aa760e..884b277f 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 dc83f772..b505cc61 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 029b6917..338720df 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 4636062a..bdd82d46 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 4eaae4a4..597dbc60 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 b8df15ac..1e7c2db4 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 788d37a1..e2ac080b 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 2bf313a5..0ecde2f2 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 280eb8ea..37d1472d 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
index 58eca1e9..3c512d99 100644
--- a/test/name-test/test-privserver.c
+++ b/test/test-privserver.c
@@ -27,7 +27,7 @@
#include <config.h>
#include <dbus/dbus-valgrind-internal.h>
-#include "../test-utils.h"
+#include "test-utils.h"
static void die (const char *message,
...) _DBUS_GNUC_NORETURN _DBUS_GNUC_PRINTF (1, 2);