From 2fca3f9082a70e1f153f6c9f195d95b0d48e363d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 21 Mar 2007 15:57:07 +0000 Subject: r21909: Merge some of my recent improvements to the test infrastructure: - Allow tests to specify what environment they need to run in (dc and none are thecurrent supported ones). - Move more Samba4-specific code out of the common code (This used to be commit dbe9de10287c902f4a5ea5d431dea4a79f9b170b) --- source4/torture/config.mk | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'source4/torture/config.mk') diff --git a/source4/torture/config.mk b/source4/torture/config.mk index 9ba48c0c8c..640e79cd95 100644 --- a/source4/torture/config.mk +++ b/source4/torture/config.mk @@ -365,8 +365,10 @@ MANPAGE = man/locktest.1 GCOV_FLAGS = -ftest-coverage -fprofile-arcs GCOV_LIBS = -lgcov +COV_TARGET = test + test_cov: - @$(MAKE) test \ + @$(MAKE) $(COV_TARGET) \ HOSTCC_CFLAGS="$(HOSTCC_CFLAGS) $(GCOV_FLAGS)" \ CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \ LDFLAGS="$(LDFLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)" \ @@ -377,8 +379,19 @@ gcov: test_cov do $(GCOV) -p -o $$I $$I/*.c; \ done +lcov-split: + rm -f samba.info + @$(MAKE) $(COV_TARGET) \ + HOSTCC_CFLAGS="$(HOSTCC_CFLAGS) $(GCOV_FLAGS)" \ + CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \ + LDFLAGS="$(LDFLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)" \ + SHLD_FLAGS="$(SHLD_FLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)" \ + TEST_OPTIONS="--analyse-cmd=\"lcov --base-directory `pwd` --directory . --capture --output-file samba.info -t\"" + -rm heimdal/lib/*/{lex,parse}.{gcda,gcno} + genhtml -o coverage samba.info + lcov: test_cov - rm heimdal/lib/*/{lex,parse}.{gcda,gcno} + -rm heimdal/lib/*/{lex,parse}.{gcda,gcno} lcov --base-directory `pwd` --directory . --capture --output-file samba.info genhtml -o coverage samba.info -- cgit