mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-22 18:20:09 +01:00
Revert "Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH"
This reverts commit 8fd2be6013.
This change was intended for 1.11.
This commit is contained in:
parent
9843c724c6
commit
384c924c77
9 changed files with 17 additions and 11 deletions
|
|
@ -506,6 +506,7 @@ if (DBUS_BUILD_TESTS)
|
||||||
set(DBUS_TEST_DATA ${CMAKE_BINARY_DIR}/test/data)
|
set(DBUS_TEST_DATA ${CMAKE_BINARY_DIR}/test/data)
|
||||||
set(TEST_SOCKET_DIR ${DBUS_SESSION_SOCKET_DIR} )
|
set(TEST_SOCKET_DIR ${DBUS_SESSION_SOCKET_DIR} )
|
||||||
set(TEST_LAUNCH_HELPER_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-daemon-launch-helper-test)
|
set(TEST_LAUNCH_HELPER_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-daemon-launch-helper-test)
|
||||||
|
set(TEST_BUS_LAUNCH_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-launch${EXEEXT})
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
set (TEST_LISTEN "unix:tmpdir=${TEST_SOCKET_DIR}")
|
set (TEST_LISTEN "unix:tmpdir=${TEST_SOCKET_DIR}")
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
// test binaries
|
// test binaries
|
||||||
#define DBUS_TEST_EXEC "@DBUS_TEST_EXEC@"
|
#define DBUS_TEST_EXEC "@DBUS_TEST_EXEC@"
|
||||||
#define DBUS_EXEEXT "@EXEEXT@"
|
#define DBUS_EXEEXT "@EXEEXT@"
|
||||||
|
#cmakedefine TEST_BUS_LAUNCH_BINARY "@TEST_BUS_LAUNCH_BINARY@"
|
||||||
|
|
||||||
/* Some dbus features */
|
/* Some dbus features */
|
||||||
#cmakedefine DBUS_ENABLE_ANSI 1
|
#cmakedefine DBUS_ENABLE_ANSI 1
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ macro(add_test_executable _target _source)
|
||||||
list(APPEND _env "DBUS_SESSION_BUS_ADDRESS=")
|
list(APPEND _env "DBUS_SESSION_BUS_ADDRESS=")
|
||||||
list(APPEND _env "DBUS_FATAL_WARNINGS=1")
|
list(APPEND _env "DBUS_FATAL_WARNINGS=1")
|
||||||
list(APPEND _env "DBUS_TEST_DATA=${PREFIX}${CMAKE_BINARY_DIR}/test/data")
|
list(APPEND _env "DBUS_TEST_DATA=${PREFIX}${CMAKE_BINARY_DIR}/test/data")
|
||||||
list(APPEND _env "DBUS_TEST_DBUS_LAUNCH=${PREFIX}${CMAKE_BINARY_DIR}/bin/dbus-launch${EXEEXT}")
|
|
||||||
list(APPEND _env "DBUS_TEST_HOMEDIR=${PREFIX}${CMAKE_BINARY_DIR}/dbus")
|
list(APPEND _env "DBUS_TEST_HOMEDIR=${PREFIX}${CMAKE_BINARY_DIR}/dbus")
|
||||||
set_tests_properties(${_target} PROPERTIES ENVIRONMENT "${_env}")
|
set_tests_properties(${_target} PROPERTIES ENVIRONMENT "${_env}")
|
||||||
endmacro(add_test_executable)
|
endmacro(add_test_executable)
|
||||||
|
|
|
||||||
|
|
@ -1731,6 +1731,9 @@ AC_DEFINE_UNQUOTED([DBUS_TEST_EXEC], ["$DBUS_TEST_EXEC"],
|
||||||
AC_DEFINE_UNQUOTED([DBUS_EXEEXT], ["$EXEEXT"],
|
AC_DEFINE_UNQUOTED([DBUS_EXEEXT], ["$EXEEXT"],
|
||||||
[Extension for executables, typically empty or .exe])
|
[Extension for executables, typically empty or .exe])
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(TEST_BUS_LAUNCH_BINARY, ["$DBUS_PWD/tools/dbus-launch$EXEEXT"],
|
||||||
|
[Full path to the dbus-launch in the builddir])
|
||||||
|
|
||||||
## Export the non-setuid external helper
|
## Export the non-setuid external helper
|
||||||
TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test$EXEEXT"
|
TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test$EXEEXT"
|
||||||
AC_SUBST(TEST_LAUNCH_HELPER_BINARY)
|
AC_SUBST(TEST_LAUNCH_HELPER_BINARY)
|
||||||
|
|
|
||||||
|
|
@ -3671,7 +3671,7 @@ _dbus_get_autolaunch_address (const char *scope,
|
||||||
* but that's done elsewhere, and if it worked, this function wouldn't
|
* but that's done elsewhere, and if it worked, this function wouldn't
|
||||||
* be called.) */
|
* be called.) */
|
||||||
const char *display;
|
const char *display;
|
||||||
const char *progpath;
|
char *progpath;
|
||||||
char *argv[6];
|
char *argv[6];
|
||||||
int i;
|
int i;
|
||||||
DBusString uuid;
|
DBusString uuid;
|
||||||
|
|
@ -3716,9 +3716,9 @@ _dbus_get_autolaunch_address (const char *scope,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
|
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
|
||||||
progpath = _dbus_getenv ("DBUS_TEST_DBUS_LAUNCH");
|
if (_dbus_getenv ("DBUS_USE_TEST_BINARY") != NULL)
|
||||||
|
progpath = TEST_BUS_LAUNCH_BINARY;
|
||||||
if (progpath == NULL)
|
else
|
||||||
#endif
|
#endif
|
||||||
progpath = DBUS_BINDIR "/dbus-launch";
|
progpath = DBUS_BINDIR "/dbus-launch";
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,6 @@ installcheck_tests =
|
||||||
installcheck_environment = \
|
installcheck_environment = \
|
||||||
export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
|
export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
|
||||||
export DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT); \
|
export DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT); \
|
||||||
export DBUS_TEST_DBUS_LAUNCH=$(DESTDIR)$(bindir)/dbus-launch$(EXEEXT); \
|
|
||||||
export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \
|
export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \
|
||||||
export DBUS_TEST_DATADIR=$(DESTDIR)$(datadir); \
|
export DBUS_TEST_DATADIR=$(DESTDIR)$(datadir); \
|
||||||
${NULL}
|
${NULL}
|
||||||
|
|
@ -183,7 +182,6 @@ AM_TESTS_ENVIRONMENT = \
|
||||||
export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
|
export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
|
||||||
export DBUS_FATAL_WARNINGS=1; \
|
export DBUS_FATAL_WARNINGS=1; \
|
||||||
export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \
|
export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \
|
||||||
export DBUS_TEST_DBUS_LAUNCH=@abs_top_builddir@/tools/dbus-launch$(EXEEXT); \
|
|
||||||
export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \
|
export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \
|
||||||
export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \
|
export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ AM_TESTS_ENVIRONMENT = \
|
||||||
export PYTHON=@PYTHON@; \
|
export PYTHON=@PYTHON@; \
|
||||||
export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \
|
export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \
|
||||||
export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \
|
export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \
|
||||||
export DBUS_TEST_DBUS_LAUNCH=@abs_top_builddir@/tools/dbus-launch$(EXEEXT); \
|
|
||||||
export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
|
export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1169,10 +1169,10 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
|
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
|
||||||
{
|
{
|
||||||
|
const char *test_daemon;
|
||||||
/* exec from testdir */
|
/* exec from testdir */
|
||||||
const char *test_daemon = getenv ("DBUS_TEST_DAEMON");
|
if (getenv ("DBUS_USE_TEST_BINARY") != NULL &&
|
||||||
|
(test_daemon = getenv ("DBUS_TEST_DAEMON")) != NULL)
|
||||||
if (test_daemon != NULL)
|
|
||||||
{
|
{
|
||||||
if (config_file == NULL && getenv ("DBUS_TEST_DATA") != NULL)
|
if (config_file == NULL && getenv ("DBUS_TEST_DATA") != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,11 @@ export LD_LIBRARY_PATH
|
||||||
unset DBUS_SESSION_BUS_ADDRESS
|
unset DBUS_SESSION_BUS_ADDRESS
|
||||||
unset DBUS_SESSION_BUS_PID
|
unset DBUS_SESSION_BUS_PID
|
||||||
|
|
||||||
|
# this does not actually affect dbus-run-session any more, but could be
|
||||||
|
# significant for dbus-launch as used by the autolaunch test
|
||||||
|
DBUS_USE_TEST_BINARY=1
|
||||||
|
export DBUS_USE_TEST_BINARY
|
||||||
|
|
||||||
$DBUS_TOP_BUILDDIR/tools/dbus-run-session \
|
$DBUS_TOP_BUILDDIR/tools/dbus-run-session \
|
||||||
--config-file="$CONFIG_FILE" \
|
--config-file="$CONFIG_FILE" \
|
||||||
--dbus-daemon="$DBUS_TOP_BUILDDIR/bus/dbus-daemon" \
|
--dbus-daemon="$DBUS_TOP_BUILDDIR/bus/dbus-daemon" \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue