Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Apr 18, 2024
1 parent fe1cb90 commit 1994c27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .ci/publish_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ for file in `ls $ARTIFACT_FOLDER | grep ".info"`; do

done

lcov $ARGS --output-file /tmp/coverage.info
lcov $ARGS --output-file /tmp/coverage_temp.info

# filter out unwanted files
lcov --remove /tmp/coverage_temp.info "*eth_*" --output-file /tmp/coverage.info || echo "$0: coverage tracefile is empty"

genhtml --title "MRS UAV System - Test coverage report" --demangle-cpp --legend --frames --show-details -o /tmp/coverage_html /tmp/coverage.info | tee /tmp/coverage.log

Expand Down
7 changes: 6 additions & 1 deletion .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,13 @@ if [[ "$FAILED" -eq 0 ]]; then

echo "$0: storing coverage data"

# gather all the coverage data from the workspace
lcov --capture --directory ${WORKSPACE} --output-file /tmp/coverage.original
lcov --remove /tmp/coverage.original "*/test/*" "*/*eth_*/*" --output-file /tmp/coverage.removed || echo "$0: coverage tracefile is empty"

# filter out unwanted files, i.e., test files
lcov --remove /tmp/coverage.original "*/test/*" --output-file /tmp/coverage.removed || echo "$0: coverage tracefile is empty"

# extract coverage data for the source folder of the workspace
lcov --extract /tmp/coverage.removed "$WORKSPACE/src/*" --output-file $ARTIFACT_FOLDER/$REPOSITORY_NAME.info || echo "$0: coverage tracefile is empty"

fi
Expand Down

0 comments on commit 1994c27

Please sign in to comment.