Skip to content

Commit 433c6ac

Browse files
authored
[WIP] Checking line coverage in codecov (#1713)
* Add parsers options * Disable all branch detection option * Replace lcov with gcov * Revert changes in codecov.yaml and remove branch coverage from coverage bash script
1 parent 536ed1f commit 433c6ac

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

‎tools/code_coverage_report.bash‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,28 @@ mkdir -p $LCOVDIR
4343
lcov --capture --initial \
4444
--directory build \
4545
--output-file ${LCOVDIR}/initial_coverage.info \
46-
--rc lcov_branch_coverage=1
46+
--rc lcov_branch_coverage=0
4747

4848
# Capture executed code data.
4949
lcov --capture \
5050
--directory build \
5151
--output-file ${LCOVDIR}/test_coverage.info \
52-
--rc lcov_branch_coverage=1
52+
--rc lcov_branch_coverage=0
5353

5454
# Combine the initial zero-coverage report with the executed lines report.
5555
lcov \
5656
--add-tracefile ${LCOVDIR}/initial_coverage.info \
5757
--add-tracefile ${LCOVDIR}/test_coverage.info \
5858
--output-file ${LCOVDIR}/full_coverage.info \
59-
--rc lcov_branch_coverage=1
59+
--rc lcov_branch_coverage=0
6060

6161
# Only include files that are within this workspace.
6262
# (eg filter out stdio.h etc)
6363
lcov \
6464
--extract ${LCOVDIR}/full_coverage.info \
6565
"${PWD}/*" \
6666
--output-file ${LCOVDIR}/workspace_coverage.info \
67-
--rc lcov_branch_coverage=1
67+
--rc lcov_branch_coverage=0
6868

6969
# Remove files in the build subdirectory.
7070
# Those are generated files (like messages, services, etc)
@@ -81,14 +81,13 @@ lcov \
8181
--remove ${LCOVDIR}/workspace_coverage.info \
8282
"${PWD}/*/nav2_system_tests/*" \
8383
--output-file ${LCOVDIR}/project_coverage.info \
84-
--rc lcov_branch_coverage=1
84+
--rc lcov_branch_coverage=0
8585

8686
if [ $COVERAGE_REPORT_VIEW = codecovio ]; then
8787
bash <(curl -s https://codecov.io/bash) \
8888
-f ${LCOVDIR}/project_coverage.info \
8989
-R src/navigation2
9090
elif [ $COVERAGE_REPORT_VIEW = genhtml ]; then
9191
genhtml ${LCOVDIR}/project_coverage.info \
92-
--output-directory ${LCOVDIR}/html \
93-
--branch-coverage -p ${PWD}
92+
--output-directory ${LCOVDIR}/html
9493
fi

0 commit comments

Comments
 (0)