Improve code coverage numbers by excluding some options (#5805)
* Potentially improve code coverage numbers by excluding some options * Removed dead lines; replicated switches to both gcovr executions * added link to gcovr branch coverage faq
This commit is contained in:
parent
5f71ab8515
commit
2b987eeed8
@ -4,6 +4,10 @@
|
|||||||
# Defines utility functions to create code coverage targets with gcov.
|
# Defines utility functions to create code coverage targets with gcov.
|
||||||
# gcov html and xml report.
|
# gcov html and xml report.
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# There is an incredibly helpful FAQ on gcovr and branch coverage which should be read
|
||||||
|
# here: https://gcovr.com/en/stable/faq.html#why-does-c-code-have-so-many-uncovered-branches
|
||||||
|
|
||||||
|
|
||||||
## SET UP only when option is set.
|
## SET UP only when option is set.
|
||||||
if(BUILD_CODE_COVERAGE)
|
if(BUILD_CODE_COVERAGE)
|
||||||
@ -55,7 +59,8 @@ function(add_gcovr_html)
|
|||||||
-r ${BASEDIR} ${EXCLUDE_ARGS}
|
-r ${BASEDIR} ${EXCLUDE_ARGS}
|
||||||
--object-directory=${PROJECT_BINARY_DIR}
|
--object-directory=${PROJECT_BINARY_DIR}
|
||||||
-o ${args_TARGET_NAME}/index.html
|
-o ${args_TARGET_NAME}/index.html
|
||||||
|
--exclude-unreachable-branches
|
||||||
|
--exclude-throw-branches
|
||||||
BYPRODUCTS ${PROJECT_BINARY_DIR}/${args_TARGET_NAME} # report directory
|
BYPRODUCTS ${PROJECT_BINARY_DIR}/${args_TARGET_NAME} # report directory
|
||||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||||
DEPENDS
|
DEPENDS
|
||||||
@ -102,6 +107,8 @@ function(add_gcovr_xml)
|
|||||||
-r ${BASEDIR} ${EXCLUDE_ARGS}
|
-r ${BASEDIR} ${EXCLUDE_ARGS}
|
||||||
--object-directory=${PROJECT_BINARY_DIR}
|
--object-directory=${PROJECT_BINARY_DIR}
|
||||||
-o ${args_TARGET_NAME}.xml
|
-o ${args_TARGET_NAME}.xml
|
||||||
|
--exclude-unreachable-branches
|
||||||
|
--exclude-throw-branches
|
||||||
BYPRODUCTS ${args_TARGET_NAME}.xml
|
BYPRODUCTS ${args_TARGET_NAME}.xml
|
||||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||||
DEPENDS
|
DEPENDS
|
||||||
|
|||||||
@ -52,7 +52,7 @@ extends:
|
|||||||
LiveTestCtestRegex: azure-core.|json-test
|
LiveTestCtestRegex: azure-core.|json-test
|
||||||
LiveTestTimeoutInMinutes: 90 # default is 60 min. We need a little longer on worst case for Win+jsonTests
|
LiveTestTimeoutInMinutes: 90 # default is 60 min. We need a little longer on worst case for Win+jsonTests
|
||||||
LineCoverageTarget: 88
|
LineCoverageTarget: 88
|
||||||
BranchCoverageTarget: 50
|
BranchCoverageTarget: 68
|
||||||
UseFederatedAuth: true
|
UseFederatedAuth: true
|
||||||
# PreTestSteps:
|
# PreTestSteps:
|
||||||
# - pwsh: |
|
# - pwsh: |
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user