Changeset View
Changeset View
Standalone View
Standalone View
cmake/templates/CoverageTest.sh.in
Show All 22 Lines | "${LCOV_EXECUTABLE}" --gcov-tool="${GCOV_EXECUTABLE}" ${LCOV_OPTIONS} \ | ||||
-a "${TARGET}_filtered.info" \ | -a "${TARGET}_filtered.info" \ | ||||
-o "${TARGET}_combined.info" | -o "${TARGET}_combined.info" | ||||
# Generate the HTML coverage report from the coverage data. | # Generate the HTML coverage report from the coverage data. | ||||
"${GENHTML_EXECUTABLE}" ${LCOV_OPTIONS} \ | "${GENHTML_EXECUTABLE}" ${LCOV_OPTIONS} \ | ||||
--demangle-cpp \ | --demangle-cpp \ | ||||
-s "${TARGET}_combined.info" \ | -s "${TARGET}_combined.info" \ | ||||
-o "${CMAKE_BINARY_DIR}/${TARGET}.coverage" | -o "${CMAKE_BINARY_DIR}/${TARGET}.coverage" | ||||
# Generate a textual coverage report and summary from the coverage data. | |||||
# Depending on the version of lcov, the following commands can output to stdout, | |||||
# stderr or both, and not necessarily the same way for both options. This forces | |||||
# us to redirect both to be sure to catch all the output. There is the -o option | |||||
# to set the output file but obviously it doesn't work for these cases. | |||||
"${LCOV_EXECUTABLE}" ${LCOV_OPTIONS} \ | |||||
--list "${TARGET}_combined.info" \ | |||||
> "${CMAKE_BINARY_DIR}/${TARGET}.coverage/coverage.txt" 2>&1 | |||||
"${LCOV_EXECUTABLE}" ${LCOV_OPTIONS} \ | |||||
--summary "${TARGET}_combined.info" \ | |||||
> "${CMAKE_BINARY_DIR}/${TARGET}.coverage/coverage-summary.txt" 2>&1 |