summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-17 02:06:07 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-17 02:06:07 +0200
commitab07a60d6ed1d9704590747ac69bbaa22bef2df3 (patch)
tree7375fbedc89893bec97ededcef9cc92e946cf01f /source4/torture
parentbbb826bdac54e3fec3426fe6d8e23790abbbc44f (diff)
downloadsamba-ab07a60d6ed1d9704590747ac69bbaa22bef2df3.tar.gz
samba-ab07a60d6ed1d9704590747ac69bbaa22bef2df3.tar.bz2
samba-ab07a60d6ed1d9704590747ac69bbaa22bef2df3.zip
Avoid recursive make for code coverage.
(This used to be commit 2d1ca8cb7a1c39894e5f232f7e84936e6e1830ee)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/config.mk33
1 files changed, 18 insertions, 15 deletions
diff --git a/source4/torture/config.mk b/source4/torture/config.mk
index 6e1bacf199..c2ec7c573a 100644
--- a/source4/torture/config.mk
+++ b/source4/torture/config.mk
@@ -313,28 +313,31 @@ locktest_OBJ_FILES = torture/locktest.o
MANPAGES += torture/man/locktest.1
-COV_TARGET = test
+ifeq ($(MAKECMDGOALS),gcov)
+GCOV?=1
+endif
+
+ifeq ($(MAKECMDGOALS),lcov)
+GCOV?=1
+endif
-COV_VARS = \
- CFLAGS="$(CFLAGS) --coverage" \
- LDFLAGS="$(LDFLAGS) --coverage"
+ifeq ($(MAKECMDGOALS),testcov-html)
+GCOV?=1
+endif
-test_cov:
- -$(MAKE) $(COV_TARGET) $(COV_VARS)
+ifdef GCOV
+CFLAGS += --coverage
+LDFLAGS += --coverage
+endif
+
+COV_TARGET = test
-gcov: test_cov
+gcov: test
for I in $(sort $(dir $(ALL_OBJS))); \
do $(GCOV) -p -o $$I $$I/*.c; \
done
-lcov-split:
- rm -f samba.info
- @$(MAKE) $(COV_TARGET) $(COV_VARS) \
- 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
+lcov: test
-rm heimdal/lib/*/{lex,parse}.{gcda,gcno}
lcov --base-directory `pwd` --directory . --capture --output-file samba.info
genhtml -o coverage samba.info