summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2013-10-04 16:37:39 +0200
committerThomas Haller <thaller@redhat.com>2013-10-04 17:02:43 +0200
commit6868076e3ce77958cd9769589e535d3c4bed2274 (patch)
tree0d8182555317ab3b632bd946d875b6e6bc243bff
parent08670c9163a5d0f15c57c7891ef899eb125d9423 (diff)
downloadNetworkManager-6868076e3ce77958cd9769589e535d3c4bed2274.tar.gz
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 <thaller@redhat.com>
-rw-r--r--libnm-glib/tests/Makefile.am6
1 files changed, 5 insertions, 1 deletions
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