From 4eee71051b2fe20a3d9453af76cf8a10b259f800 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 25 Mar 2015 17:14:40 -0300 Subject: [PATCH] Add coverage testing rules --- Makefile.am | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile.am b/Makefile.am index 5e5ea0b8..73959199 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,9 +65,18 @@ profile: debug: $(MAKE) all CFLAGS="" AM_CPPFLAGS="-ggdb -DDEBUG" +coverage: + $(MAKE) all CFLAGS="" AM_CPPFLAGS="-fprofile-arcs -ftest-coverage -DDEBUG" AM_LDFLAGS="-lgcov" + .c.h: @srcdir@/scripts/MakeHeader.py $< cppcheck: cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS +.PHONY: lcov + +lcov: + mkdir -p lcov + lcov --capture --directory . --output-file coverage.info + genhtml coverage.info --output-directory lcov