summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/config.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/source4/torture/config.mk b/source4/torture/config.mk
index de71747a9d..651f09dc25 100644
--- a/source4/torture/config.mk
+++ b/source4/torture/config.mk
@@ -338,9 +338,18 @@ GCOV_LIBS = -lgcov
gcov:
@$(MAKE) test \
+ HOSTCC_CFLAGS="$(HOSTCC_CFLAGS) $(GCOV_FLAGS)" \
CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \
- LD_FLAGS="$(LD_FLAGS) $(GCOV_FLAGS)" \
- LIBS="$(LIBS) $(GCOV_LIBS)"
+ LDFLAGS="$(LDFLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)"
for I in $(sort $(dir $(ALL_OBJS))); \
do $(GCOV) -p -o $$I $$I/*.c; \
done
+
+lcov:
+ @$(MAKE) test \
+ HOSTCC_CFLAGS="$(HOSTCC_CFLAGS) $(GCOV_FLAGS)" \
+ CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \
+ LDFLAGS="$(LDFLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)"
+ rm **/{lex,parse}.{gcda,gcno}
+ lcov --base-directory `pwd` --directory . --capture --output-file samba.info
+ genhtml -o coverage samba.info