From: Gereon Kremer Date: Tue, 8 Mar 2022 23:19:36 +0000 (+0100) Subject: Produce intermediate json output for coverage (#8252) X-Git-Tag: cvc5-1.0.0~298 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ccd2a732763206e5f233fd3368c4c1048586d6d;p=cvc5.git Produce intermediate json output for coverage (#8252) This splits the generation of coverage information into two steps, generating an intermediate json file. This allows further tooling to used this json information: we plan to check whether the APIs (and their tests) are complete by looking at their code coverage within the cpp api. --- diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake index c003d2cef..9c691f8f7 100644 --- a/cmake/CodeCoverage.cmake +++ b/cmake/CodeCoverage.cmake @@ -54,17 +54,24 @@ function(setup_code_coverage_fastcov) "Resetting code coverage counters to zero." ) - add_custom_target(${COVERAGE_NAME} + add_custom_target(${COVERAGE_NAME}-json COMMAND ${FASTCOV_BINARY} -d ${COVERAGE_PATH} ${EXCLUDES} -o coverage.json -j${FASTCOV_PARALLEL_JOBS} -X + DEPENDS + ${COVERAGE_DEPENDENCIES} + COMMENT + "Generate code coverage JSON report." + ) + + add_custom_target(${COVERAGE_NAME} COMMAND ${FASTCOV_BINARY} -C coverage.json --lcov -o coverage.info COMMAND ${GENHTML_BINARY} --demangle-cpp --no-prefix -o coverage coverage.info DEPENDS - ${COVERAGE_DEPENDENCIES} + coverage-json COMMENT "Generate code coverage report." )