All checks were successful
Build ptprnt / build (push) Successful in 1m49s
This branch fixes a couple of issues with the build - stop linking everything in a library which is then linked against a single main. It doesn't work the way I wanted. If functionality needs to be exposed by a library, it can be done later or with a separate target - This should also fix spdlog - Source files are now in a separate meson file using mesons files() feautre - Improve coverage generation by adding a script generating html coverage reports. This will hopefully keep the motivation higher to create more unit tests - Increase the code coverage a bit to demonstrate that statement above is not a fluke 😄 Reviewed-on: #7
21 lines
566 B
Bash
Executable File
21 lines
566 B
Bash
Executable File
#!/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 |