Skip to content

Commit

Permalink
Removed mock files from coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
italo-sampaio committed Oct 9, 2024
1 parent 03da1bd commit 1a568c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firmware/coverage/gen-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ if [[ $1 == "exec" ]]; then

# Capture coverage data
lcov --capture --directory $SRCDIR --list-full-path --output-file $BASEDIR/coverage.info
# Remove unwanted coverage info (test files, tcpsigner, x86 HAL implementation)
# Remove unwanted coverage info (test files, tcpsigner, x86 HAL implementation, mock files)
lcov --remove $BASEDIR/coverage.info "*/test_*.c" --output-file $BASEDIR/coverage.info
lcov --remove $BASEDIR/coverage.info "*/tcpsigner/src/*" --output-file $BASEDIR/coverage.info
lcov --remove $BASEDIR/coverage.info "*/hal/src/x86/*" --output-file $BASEDIR/coverage.info
lcov --remove $BASEDIR/coverage.info "*/mock_*.c" --output-file $BASEDIR/coverage.info
# Generate report and summary
genhtml $BASEDIR/coverage.info --output $BASEDIR/output -p $SRCDIR -t "powHSM firmware"
lcov --summary $BASEDIR/coverage.info | grep lines | sed -e "s/.\+lines.\+: \([[:digit:].]\+\).\+/\1/g" > $BASEDIR/output/total
Expand Down

0 comments on commit 1a568c4

Please sign in to comment.