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>
This commit is contained in:
Thomas Haller 2013-10-04 16:37:39 +02:00
parent 08670c9163
commit 6868076e3c

View file

@ -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