From 1a568c43dc2cefdb2bf384fdd88c0f51c84f34e9 Mon Sep 17 00:00:00 2001 From: Italo Sampaio Date: Wed, 9 Oct 2024 10:32:20 -0300 Subject: [PATCH] Removed mock files from coverage report --- firmware/coverage/gen-coverage | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/coverage/gen-coverage b/firmware/coverage/gen-coverage index 4fd85d76..d4a647b1 100755 --- a/firmware/coverage/gen-coverage +++ b/firmware/coverage/gen-coverage @@ -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