Skip to content

Commit

Permalink
Update code_coverage.sh (#244)
Browse files Browse the repository at this point in the history
Ignore tests folder on coverage calculation
  • Loading branch information
berndgassmann authored Aug 19, 2024
1 parent a4db593 commit 86da363
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/code_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ get_coverage() {
lcov -q -i -c -d ${BUILD_DIR} -b ${SRC_DIR} --no-external -o initialCoverage_${PACKAGE_NAME}.info
lcov -q -c -d ${BUILD_DIR} -b ${SRC_DIR} --no-external -o testCoverage_${PACKAGE_NAME}.info --rc lcov_branch_coverage=1
lcov -q -a initialCoverage_${PACKAGE_NAME}.info -a testCoverage_${PACKAGE_NAME}.info -o coverage_${PACKAGE_NAME}.info --rc lcov_branch_coverage=1
lcov -q -r coverage_${PACKAGE_NAME}.info "impl/test*" -o coverage_${PACKAGE_NAME}.info --rc lcov_branch_coverage=1
lcov -q -r coverage_${PACKAGE_NAME}.info "tests/*" -o coverage_${PACKAGE_NAME}.info --rc lcov_branch_coverage=1
grep -v -E 'D0Ev|D1Ev|C1Ev|C1Eb' coverage_${PACKAGE_NAME}.info > cleanedCoverage_${PACKAGE_NAME}.info
lcov --summary cleanedCoverage_${PACKAGE_NAME}.info --rc lcov_branch_coverage=1
genhtml -t ${PACKAGE_NAME} -p ${PWD}/${SRC_DIR} --branch-coverage -o coverage/${SRC_DIR} cleanedCoverage_${PACKAGE_NAME}.info
Expand Down

0 comments on commit 86da363

Please sign in to comment.