Commit 7d8468e0 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

CI: use a wrapper script to generate coverage report

parent 5b750421
Pipeline #2128 passed with stages
in 52 minutes and 59 seconds
......@@ -227,7 +227,7 @@ ubuntu-xdk-qa-code-coverage:
ctest -V -S CI/main_qa.cmake
- gcovr -x -o build/coverage_report.xml -r . --gcov-executable="llvm-cov gcov" build
- ./CI/
- saxon-xslt -o build/ctest_report.xml
build/Testing/`head -n 1 build/Testing/TAG`/Test.xml
# usage : call CI/ from source dir
OTB_DIR="$(dirname $0)/.."
OTB_DIR="$(readlink -f $OTB_DIR)"
if [ -z "$BUILD_DIR" ]; then
mkdir cov_filter
echo Generating gcov reports in $BUILD_DIR ...
find $BUILD_DIR -name "*.gcda" -exec llvm-cov gcov -p '{}' > /dev/null \;
find . -maxdepth 1 -regex '.*#Modules#[a-zA-Z0-9]+#[a-zA-Z0-9]+#\(include\|src\|app\)#.*\.gcov' -exec mv '{}' cov_filter \;
rm *.gcov
echo Filtered $(ls $BUILD_DIR/cov_filter | wc -l) gcov reports
echo Generating $BUILD_DIR/coverage_report.xml ...
gcovr -r $OTB_DIR -x -g --object-directory=$BUILD_DIR/cov_filter > $BUILD_DIR/coverage_report.xml
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment