mirror of
https://github.com/nlohmann/json.git
synced 2026-10-18 12:08:12 +00:00
🔨 added Makefile target to calculate lcov coverage
This commit is contained in:
1 file changed
+15
@@ -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
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|||||||
Reference in new issue
Block a user