From 6868076e3ce77958cd9769589e535d3c4bed2274 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 4 Oct 2013 16:37:39 +0200 Subject: [PATCH] test: launch dbus for test-remote-settings-client Running `make check` on systems without running dbus failed in test-remote-settings-client.c:383 make[4]: Entering directory `/tmp/NetworkManager/libnm-glib/tests' /tmp/NetworkManager/libnm-glib/tests/test-remote-settings-client /tmp/NetworkManager/libnm-glib/tests test-remote-settings-service.py ** (/tmp/NetworkManager/libnm-glib/tests/.libs/lt-test-remote-settings-client:26983): WARNING **: Error connecting to D-Bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 make[4]: *** [check-local] Trace/breakpoint trap (core dumped) Modify the Makefile to start the dbus-daemon, if it is not yet running. Signed-off-by: Thomas Haller --- libnm-glib/tests/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libnm-glib/tests/Makefile.am b/libnm-glib/tests/Makefile.am index ebad96fa7b..62e7e9561f 100644 --- a/libnm-glib/tests/Makefile.am +++ b/libnm-glib/tests/Makefile.am @@ -29,6 +29,10 @@ TEST_RSS_BIN = test-remote-settings-service.py EXTRA_DIST = $(TEST_RSS_BIN) check-local: test-remote-settings-client - $(abs_builddir)/test-remote-settings-client $(abs_srcdir) $(TEST_RSS_BIN) + if test -z "$$DBUS_SESSION_BUS_ADDRESS" ; then \ + dbus-launch --exit-with-session $(abs_builddir)/test-remote-settings-client $(abs_srcdir) $(TEST_RSS_BIN); \ + else \ + $(abs_builddir)/test-remote-settings-client $(abs_srcdir) $(TEST_RSS_BIN); \ + fi; endif