[Telepathy-commits] [telepathy-gabble/master] Insert "wait for exit" in a way that only enables it when using lcov or refdbg

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Jan 20 11:00:46 PST 2009


Based on comments from Guillaume.
---
 Makefile.am               |    2 ++
 tests/twisted/Makefile.am |   10 +++++++++-
 tools/lcov.am             |    2 +-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 8fb5722..eb7ce96 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,4 +10,6 @@ check-twisted: all
 check-all: check check-twisted
 
 include tools/lcov.am
+LCOV_CHECK_ARGS = CHECK_TWISTED_SLEEP=6
+
 include tools/telepathy.am
diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index 9538647..2a06e65 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -98,12 +98,20 @@ TESTS_ENVIRONMENT = \
 
 check-local: check-coding-style check-twisted
 
+# set to 6 when using refdbg, to give Gabble time to exit
+CHECK_TWISTED_SLEEP=0
+
 check-twisted:
 	$(MAKE) -C tools
 	rm -f tools/core
 	rm -f tools/gabble-testing.log
+	if test -n "$$GABBLE_TEST_REFDBG"; then \
+	  sleep=6; \
+        else \
+	  sleep=$(CHECK_TWISTED_SLEEP); \
+	fi; \
 	sh $(srcdir)/tools/with-session-bus.sh \
-		--sleep=6 \
+		--sleep=$$sleep \
 		--config-file=tools/tmp-session-bus.conf \
 		-- $(MAKE) check-TESTS \
 		TESTS="$(TWISTED_TESTS)" \
diff --git a/tools/lcov.am b/tools/lcov.am
index 494eea0..7384f1b 100644
--- a/tools/lcov.am
+++ b/tools/lcov.am
@@ -18,7 +18,7 @@ lcov-report:
 
 lcov-check:
 	$(MAKE) lcov-reset
-	$(MAKE) check
+	$(MAKE) check $(LCOV_CHECK_ARGS)
 	$(MAKE) lcov-report
 
 ## vim:set ft=automake:
-- 
1.5.6.5




More information about the Telepathy-commits mailing list