]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Revert "Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH"
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 12 Feb 2016 15:25:15 +0000 (15:25 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 12 Feb 2016 15:25:15 +0000 (15:25 +0000)
This reverts commit 8fd2be6013e3d0ff6a6ff63ea022f9606d9a87c6.
This change was intended for 1.11.

cmake/CMakeLists.txt
cmake/config.h.cmake
cmake/modules/Macros.cmake
configure.ac
dbus/dbus-sysdeps-unix.c
test/Makefile.am
test/name-test/Makefile.am
tools/dbus-launch.c
tools/run-with-tmp-session-bus.sh

index 133325030efa110db79e09d9122f9c850dd9cb51..4db9c67ae19f3daaf4ce41eaad2117d8c9786696 100644 (file)
@@ -506,6 +506,7 @@ if (DBUS_BUILD_TESTS)
     set(DBUS_TEST_DATA ${CMAKE_BINARY_DIR}/test/data)
     set(TEST_SOCKET_DIR ${DBUS_SESSION_SOCKET_DIR} )
     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)
         set (TEST_LISTEN "unix:tmpdir=${TEST_SOCKET_DIR}")
     endif (UNIX)
index c4983623c71eb64154ed23d27f276a4387ae37e1..d2af3c96deddc77fda43cbfdf7d00e75cd11c093 100644 (file)
@@ -33,6 +33,7 @@
 // test binaries
 #define DBUS_TEST_EXEC "@DBUS_TEST_EXEC@"
 #define DBUS_EXEEXT "@EXEEXT@"
+#cmakedefine TEST_BUS_LAUNCH_BINARY "@TEST_BUS_LAUNCH_BINARY@"
 
 /* Some dbus features */
 #cmakedefine DBUS_ENABLE_ANSI 1
index 8e0278a43ecbb0e72380ad67913dc50bc21a8aa1..fd3f62c4aef89df2f8b7238ebe3ae9e4a19729c0 100644 (file)
@@ -52,7 +52,6 @@ macro(add_test_executable _target _source)
     list(APPEND _env "DBUS_SESSION_BUS_ADDRESS=")
     list(APPEND _env "DBUS_FATAL_WARNINGS=1")
     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")
     set_tests_properties(${_target} PROPERTIES ENVIRONMENT "${_env}")
 endmacro(add_test_executable)
index a734a3b6d29192622b2ddfabf1e08c8fa3dee851..5e883435c999fb9ea77083995a1b623d6aeaed90 100644 (file)
@@ -1731,6 +1731,9 @@ AC_DEFINE_UNQUOTED([DBUS_TEST_EXEC], ["$DBUS_TEST_EXEC"],
 AC_DEFINE_UNQUOTED([DBUS_EXEEXT], ["$EXEEXT"],
                    [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
 TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test$EXEEXT"
 AC_SUBST(TEST_LAUNCH_HELPER_BINARY)
index f0fca85ed7639b927df4bf0a37cb13368f4d974c..50ca60a212d69ed1e62eed33272314bb58cb0e46 100644 (file)
@@ -3671,7 +3671,7 @@ _dbus_get_autolaunch_address (const char *scope,
    * but that's done elsewhere, and if it worked, this function wouldn't
    * be called.) */
   const char *display;
-  const char *progpath;
+  char *progpath;
   char *argv[6];
   int i;
   DBusString uuid;
@@ -3716,9 +3716,9 @@ _dbus_get_autolaunch_address (const char *scope,
     }
 
 #ifdef DBUS_ENABLE_EMBEDDED_TESTS
-  progpath = _dbus_getenv ("DBUS_TEST_DBUS_LAUNCH");
-
-  if (progpath == NULL)
+  if (_dbus_getenv ("DBUS_USE_TEST_BINARY") != NULL)
+    progpath = TEST_BUS_LAUNCH_BINARY;
+  else
 #endif
     progpath = DBUS_BINDIR "/dbus-launch";
   /*
index 1438995c070398bb4e3e6a01dfcaa80fdc6a07d2..b7f40bb01dd625a2c07c2abbf4ad0a79c1853692 100644 (file)
@@ -174,7 +174,6 @@ installcheck_tests =
 installcheck_environment = \
        export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
        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_DATADIR=$(DESTDIR)$(datadir); \
        ${NULL}
@@ -183,7 +182,6 @@ AM_TESTS_ENVIRONMENT = \
        export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
        export DBUS_FATAL_WARNINGS=1; \
        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_HOMEDIR=@abs_top_builddir@/dbus; \
        $(NULL)
index fae289208fcf6d815b87b94337e5e9655505be82..3b7fcc6282474a99a79c0ddd444c83afe6883451 100644 (file)
@@ -25,7 +25,6 @@ AM_TESTS_ENVIRONMENT = \
         export PYTHON=@PYTHON@; \
         export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \
         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; \
         $(NULL)
 
index 1b6550271c9fecbdb36fbdee57a1411f5fe1ee4d..0f1e6eded8aa24ff009f4f8c3b03fb0677976b09 100644 (file)
@@ -1169,10 +1169,10 @@ main (int argc, char **argv)
  
 #ifdef DBUS_ENABLE_EMBEDDED_TESTS
       {
+        const char *test_daemon;
         /* exec from testdir */
-        const char *test_daemon = getenv ("DBUS_TEST_DAEMON");
-
-        if (test_daemon != NULL)
+        if (getenv ("DBUS_USE_TEST_BINARY") != NULL &&
+            (test_daemon = getenv ("DBUS_TEST_DAEMON")) != NULL)
           {
             if (config_file == NULL && getenv ("DBUS_TEST_DATA") != NULL)
               {
index 688f9e483050945f32c1ab6245ac0b14277f5100..94ae8fc8fd8d8e3a2bcd10527bb284009238f8fb 100755 (executable)
@@ -45,6 +45,11 @@ export LD_LIBRARY_PATH
 unset DBUS_SESSION_BUS_ADDRESS
 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 \
     --config-file="$CONFIG_FILE" \
     --dbus-daemon="$DBUS_TOP_BUILDDIR/bus/dbus-daemon" \