mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
fixed report branch coverage
This commit is contained in:
parent
c0fa115a3b
commit
1feaad6d55
@ -86,16 +86,17 @@ enable_testing()
|
|||||||
gtest_discover_tests(alltests TEST_PREFIX alltests:)
|
gtest_discover_tests(alltests TEST_PREFIX alltests:)
|
||||||
|
|
||||||
add_custom_target(coverage
|
add_custom_target(coverage
|
||||||
./alltests
|
mkdir -p coverage
|
||||||
COMMAND mkdir -p coverage
|
COMMAND lcov --initial --capture --directory . --output-file coverage/lcov_base.info --rc lcov_branch_coverage=1
|
||||||
COMMAND lcov --capture --directory . --output-file coverage/lcov.info
|
COMMAND ./alltests
|
||||||
COMMAND lcov --remove coverage/lcov.info '/usr/*' --output-file coverage/lcov.info
|
COMMAND lcov --capture --directory . --output-file coverage/lcov.info --rc lcov_branch_coverage=1
|
||||||
COMMAND lcov --remove coverage/lcov.info '*/test/*' --output-file coverage/lcov.info
|
COMMAND lcov --remove coverage/lcov.info '/usr/*' --output-file coverage/lcov.info --rc lcov_branch_coverage=1
|
||||||
|
COMMAND lcov --remove coverage/lcov.info '*/test/*' --output-file coverage/lcov.info --rc lcov_branch_coverage=1
|
||||||
)
|
)
|
||||||
add_dependencies(coverage alltests)
|
add_dependencies(coverage alltests)
|
||||||
|
|
||||||
add_custom_target(coverage-report
|
add_custom_target(coverage-report
|
||||||
COMMAND genhtml coverage/lcov.info --output-directory coverage/report
|
COMMAND genhtml --branch-coverage --highlight --legend --prefix "${CMAKE_SOURCE_DIR}" coverage/lcov.info --output-directory coverage/report
|
||||||
)
|
)
|
||||||
add_dependencies(coverage-report coverage)
|
add_dependencies(coverage-report coverage)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user