From c35b4e845b2d5d5e1a27ab3a374bb2a3d9ad3c35 Mon Sep 17 00:00:00 2001 From: Premysl Hruby Date: Wed, 4 Apr 2012 19:17:32 +0200 Subject: [PATCH] add support for generation of lcov coverage reports --- src/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 57b6d8aeb..8e9f0e345 100644 --- a/src/Makefile +++ b/src/Makefile @@ -226,10 +226,10 @@ redis-check-aof: .make-prerequisites $(CHECKAOFOBJ) %.o: %.c .make-prerequisites $(QUIET_CC)$(CC) -c $(CFLAGS) $(DEBUG) $(COMPILE_TIME) -I../deps/lua/src $< -.PHONY: all clean distclean +.PHONY: all clean distclean lcov clean: - rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) $(CHECKDUMPPRGNAME) $(CHECKAOFPRGNAME) *.o *.gcda *.gcno *.gcov + rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) $(CHECKDUMPPRGNAME) $(CHECKAOFPRGNAME) *.o *.gcda *.gcno *.gcov redis.info lcov-html distclean: clean -(cd ../deps && $(MAKE) distclean) @@ -241,6 +241,12 @@ dep: test: redis-server redis-check-aof @(cd ..; ./runtest) +lcov: + $(MAKE) clean gcov + @(set -e; cd ..; ./runtest --clients 1) + @geninfo -o redis.info . + @genhtml --legend -o lcov-html redis.info + bench: ./redis-benchmark