mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 03:03:34 +08:00
Enable branch coverage
This commit is contained in:
committed by
Lorenz Meier
parent
973999a4d3
commit
7b34c1c51d
+3
-3
@@ -33,14 +33,14 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "Coverage")
|
||||
|
||||
add_custom_target(coverage_build
|
||||
COMMAND ${CMAKE_CTEST_COMMAND}
|
||||
COMMAND lcov --capture --directory . --output-file coverage.info
|
||||
COMMAND lcov --summary coverage.info
|
||||
COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1
|
||||
COMMAND lcov --rc lcov_branch_coverage=1 --summary coverage.info
|
||||
WORKING_DIRECTORY ${CMAKE_BUILD_DIR}
|
||||
DEPENDS test_build
|
||||
)
|
||||
|
||||
add_custom_target(coverage_html
|
||||
COMMAND genhtml coverage.info --output-directory out
|
||||
COMMAND genhtml coverage.info --output-directory out --branch-coverage
|
||||
COMMAND x-www-browser out/index.html
|
||||
WORKING_DIRECTORY ${CMAKE_BUILD_DIR}
|
||||
DEPENDS coverage_build
|
||||
|
||||
Reference in New Issue
Block a user