From 42d5f664779cd0857a51b450ad8c250288aa3e97 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Wed, 26 Oct 2016 18:11:35 +0200 Subject: [PATCH] Add a makefile coverage target MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … which says that current test coverage is pretty bad - 55% line-based and only 67% functions :( --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cafe42e..8ef8b60 100644 --- a/Makefile +++ b/Makefile @@ -36,10 +36,16 @@ test: pypy ./setup.py test -q; \ fi +coverage: + $(MAKE) clean + $(MAKE) test CFLAGS="-coverage" + lcov --capture --directory . --output-file coverage.info + genhtml coverage.info --output-directory out + clean: rm -rf $(DOCHTML) $(DOCTREES) rm -f $(MODNAME) rm -f *.so rm -rf build -.PHONY: doc test clean dist +.PHONY: doc test clean dist coverage -- 2.39.5