RadioLibSmol/extras/test/unit/coverage.sh
Jan Gromeš e86fb27649
[CI] Measure code coverage after unit test (#1417)
* [CI] Measure code coverage after unit test

* [CI] Update workflow

* [CI] Fix indentation

* [CI] Ignore geninfo errors

* [CI] Force gcov 11

* [CI] Install gcc 11

* [CI] Revert gcc-11

* Use ubuntu 22.04 as unit test runner

* Deploy coverage report to github pages

* Add coverage link

---------

Co-authored-by: jgromes <jan.gromes>
2025-02-10 08:35:52 +01:00

12 lines
354 B
Bash
Executable file

#!/bin/bash
set -e
filename="lcov"
rm -rf $filename.*
lcov --capture --directory build --output-file "${filename}.info"
# filter out boost and C++ standard library
lcov --remove "${filename}.info" "/usr/*/boost/*" "/usr/include/c++/*" --output-file "${filename}.info"
# generate HTML
genhtml "${filename}.info" --output-directory "${filename}.report"