a Makefile target for test coverage
This commit is contained in:
parent
d47a81296f
commit
bbc0f64fa5
1 changed files with 8 additions and 1 deletions
|
@ -10,5 +10,12 @@ json98_CXXFLAGS = -std=c++98
|
||||||
json98_CPPFLAGS = -I$(top_srcdir)/src
|
json98_CPPFLAGS = -I$(top_srcdir)/src
|
||||||
|
|
||||||
svn-clean: maintainer-clean
|
svn-clean: maintainer-clean
|
||||||
rm -fr configure INSTALL aclocal.m4 build-aux depcomp install-sh missing test-driver
|
rm -fr configure INSTALL aclocal.m4 build-aux depcomp install-sh missing test-driver cover_html *.gcda *.gcno coverage*.info
|
||||||
for DIR in $(DIST_SUBDIRS) .; do rm -f $$DIR/Makefile.in; done
|
for DIR in $(DIST_SUBDIRS) .; do rm -f $$DIR/Makefile.in; done
|
||||||
|
|
||||||
|
cover:
|
||||||
|
make clean
|
||||||
|
make json98 CXXFLAGS+="--coverage -g -fprofile-arcs -ftest-coverage" CPPFLAGS+="-DNDEBUG"
|
||||||
|
./json98
|
||||||
|
lcov --capture --directory . --output-file coverage98.info
|
||||||
|
genhtml coverage*.info --output-directory cover_html --show-details --title "$(PACKAGE_STRING)" --legend --demangle-cpp
|
||||||
|
|
Loading…
Reference in a new issue