Fix build, logging and added some coverage report (I should do more commits)
All checks were successful
Build ptprnt / build (push) Successful in 1m50s

This commit is contained in:
2023-11-16 20:58:31 +01:00
parent 9a1aee6658
commit a08f6167b3
6 changed files with 59 additions and 45 deletions

21
generate_coverage.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
HTML_COV_PATH="coverageReport/html"
HTML_START_FILE="index.html"
echo "Generating Coverage report for ptouch-prnt"
ninja -C builddir
ninja -C builddir test
mkdir -p ${HTML_COV_PATH}
gcovr --html --html-details --html-syntax-highlighting --filter src --output ${HTML_COV_PATH}/${HTML_START_FILE}
if [ $? ]
then
echo "Coverage report successful generated!"
echo "Open: file://${SCRIPT_PATH}/${HTML_COV_PATH}/${HTML_START_FILE}"
else
echo "Error generating coverage report!"
fi