🔨 added Makefile target to calculate lcov coverage
This commit is contained in:
parent
1b3df3a63f
commit
7b82e4b4c8
1 changed files with 15 additions and 0 deletions
15
Makefile
15
Makefile
|
@ -5,6 +5,7 @@ all:
|
||||||
@echo "check - compile and execute test suite"
|
@echo "check - compile and execute test suite"
|
||||||
@echo "check-fast - compile and execute test suite (skip long-running tests)"
|
@echo "check-fast - compile and execute test suite (skip long-running tests)"
|
||||||
@echo "clean - remove built files"
|
@echo "clean - remove built files"
|
||||||
|
@echo "coverage - create coverage information with lcov"
|
||||||
@echo "cppcheck - analyze code with cppcheck"
|
@echo "cppcheck - analyze code with cppcheck"
|
||||||
@echo "doctest - compile example files and check their output"
|
@echo "doctest - compile example files and check their output"
|
||||||
@echo "fuzz_testing - prepare fuzz testing of the JSON parser"
|
@echo "fuzz_testing - prepare fuzz testing of the JSON parser"
|
||||||
|
@ -35,11 +36,25 @@ check-fast:
|
||||||
clean:
|
clean:
|
||||||
rm -fr json_unit json_benchmarks fuzz fuzz-testing *.dSYM test/*.dSYM
|
rm -fr json_unit json_benchmarks fuzz fuzz-testing *.dSYM test/*.dSYM
|
||||||
rm -fr benchmarks/files/numbers/*.json
|
rm -fr benchmarks/files/numbers/*.json
|
||||||
|
rm -fr build_coverage
|
||||||
$(MAKE) clean -Cdoc
|
$(MAKE) clean -Cdoc
|
||||||
$(MAKE) clean -Ctest
|
$(MAKE) clean -Ctest
|
||||||
$(MAKE) clean -Cbenchmarks
|
$(MAKE) clean -Cbenchmarks
|
||||||
|
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
# coverage
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
mkdir build_coverage
|
||||||
|
cd build_coverage ; CXX=g++-5 cmake .. -GNinja -DJSON_Coverage=ON
|
||||||
|
cd build_coverage ; ninja
|
||||||
|
cd build_coverage ; ctest
|
||||||
|
cd build_coverage ; ninja lcov_html
|
||||||
|
open build_coverage/test/html/index.html
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# documentation tests
|
# documentation tests
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
Loading…
Reference in a new issue