summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-05 19:54:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:36:32 -0500
commit46ca543e198d96598521ac809db9c21ff467e588 (patch)
tree1ffdcb1be111ec7021e063d734322b5979b5a882 /source4/torture
parent3ca370b3db92c12d6dc649e93b33febd248a945f (diff)
downloadsamba-46ca543e198d96598521ac809db9c21ff467e588.tar.gz
samba-46ca543e198d96598521ac809db9c21ff467e588.tar.bz2
samba-46ca543e198d96598521ac809db9c21ff467e588.zip
r10041: Add 'gcov' make target. Run
'make clean gcov' to generate a set of files describing the test coverage of the Samba 4 code. (This used to be commit 72bb84add469ad4f027ddbd8d73bb846b0609fa2)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/config.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/torture/config.mk b/source4/torture/config.mk
index c0ce3dacd3..a1fa5278b1 100644
--- a/source4/torture/config.mk
+++ b/source4/torture/config.mk
@@ -281,3 +281,15 @@ REQUIRED_SUBSYSTEMS = \
MANPAGE = torture/man/locktest.1
# End BINARY locktest
#################################
+
+GCOV_FLAGS = -ftest-coverage -fprofile-arcs
+GCOV_LIBS = -lgcov
+
+gcov:
+ @$(MAKE) test \
+ CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \
+ LD_FLAGS="$(LD_FLAGS) $(GCOV_FLAGS)" \
+ LIBS="$(LIBS) $(GCOV_LIBS)"
+ for I in $(sort $(dir $(_ALL_OBJS_OBJS))); \
+ do $(GCOV) -p -o $$I $$I/*.c; \
+ done