[pygobject] Run test suite under dbus-launch



commit 14c4cf8e6edae893538680964380d543bde4a14d
Author: Martin Pitt <martin pitt ubuntu com>
Date:   Wed Feb 9 11:34:59 2011 +0100

    Run test suite under dbus-launch
    
    When available, run the test suite in dbus-launch, so that the GDBus tests
    succeed even when building this in an environment without a running session
    D-BUS (such as distribution package builds).

 tests/Makefile.am |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index eb36819..23d049b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -102,6 +102,7 @@ EXTRA_DIST += $(TEST_FILES)
 clean-local:
 	rm -f $(LTLIBRARIES:.la=.so) file.txt~
 
+DBUS_LAUNCH=$(shell which dbus-launch)
 
 check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
 	TEST_FILES="$(TEST_FILES)" \
@@ -109,7 +110,7 @@ check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.t
 	LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH \
 	GI_TYPELIB_PATH=$(builddir):$$GI_TYPELIB_PATH \
 	XDG_DATA_DIRS=$$XDG_DATA_DIRS:/usr/share \
-	$(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
+	$(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
 
 check.gdb:
 	EXEC_NAME="gdb --args" $(MAKE) check



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]