Commit a2e491e7 authored by Guillaume Pasero's avatar Guillaume Pasero

CI: enable coverage

parent d394ff5e
Pipeline #2069 failed
......@@ -63,6 +63,7 @@ stages:
- build/compile_commands.json
- build/ctest_report.xml
- build/cppcheck_report.xml
- build/coverage_report.xml
.common-prepare:
extends: .general
......@@ -226,10 +227,11 @@ ubuntu-xdk-qa-code-coverage:
ctest -V -S CI/main_qa.cmake
-DIMAGE_NAME:string=ubuntu-18.04-llvm-qa
-DQA:BOOL=ON
- gcovr -x -o build/coverage_report.xml build/cov_data
- saxon-xslt -o build/ctest_report.xml
build/Testing/`head -n 1 build/Testing/TAG`/Test.xml
CI/ctest2junit.xsl
after_script: []
#~ after_script: []
dependencies:
- ubuntu-xdk-prepare
......
......@@ -30,3 +30,12 @@ CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld
")
# handle gcov setup
set(COVERAGE_OUTPUT_DIR "${CTEST_BINARY_DIRECTORY}/cov_data")
string(REGEX MATCHALL "/[^/]" _slash_matches "${COVERAGE_OUTPUT_DIR}")
list(LENGTH _slash_matches COVERAGE_PREFIX_STRIP)
set(ENV{GCOV_PREFIX} "${COVERAGE_OUTPUT_DIR}")
set(ENV{GCOV_PREFIX_STRIP} "${COVERAGE_PREFIX_STRIP}")
message("GCOV_PREFIX : ${GCOV_PREFIX}")
message("GCOV_PREFIX_STRIP : ${GCOV_PREFIX_STRIP}")
......@@ -16,6 +16,5 @@ sonar.cxx.suffixes.headers=.hxx,.h
#sonar.cxx.jsonCompilationDatabase=build/compile_commands.json
sonar.cxx.compiler.parser=GCC
sonar.cxx.xunit.reportPath=build/ctest_report.xml
# Not provided yet
#sonar.cxx.coverage.reportPath=build/coverage_report.xml
sonar.cxx.coverage.reportPath=build/coverage_report.xml
sonar.cxx.cppcheck.reportPath=build/cppcheck_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