Tools: SonarQube Server 6.0, Sonar Scanner 3.0.3, Jenkins running on a Linux Build Slave with pipeline format, CppuTest, gcovr, Bitbucket, git, JDK 8
Problem: The Coverage measure on the sonarqube server inexplicably show 0.0% coverage, and a non-zero number for Unit Tests (shown below). The path to coverage report is accessed using sonar.cxx.coverage.reportPath=
. CppuTest uses the -ojunit flag and gcov produces .gcna files that are converted to a single format using gcovr
.
I have manually opened the coverage-report.xml and it seems to be in the correct format (snippet):
<package branch-rate="0.0" complexity="0.0" line-rate="1.0" name="path > to unit test object file in class notation">
<classes>
<class branch-rate="0.0" complexity="0.0" filename="path to > source file" line-rate="1.0" name="nameOfSourceFile_cpp">
<lines>
<line branch="false" hits="104" number="97"/>
<line branch="false" hits="104" number="101"/>
<line branch="false" hits="104" number="103"/>
<line branch="false" hits="1" number="85"/>
<line branch="false" hits="1" number="88"/>
<line branch="false" hits="104" number="95"/>
</lines>
</class>
</classes>
</package>
The UT Coverage field on the Bitbucket Pull Request also shows 0%. I am certain that this number should be non-zero. All other aspects of SonarQube are working, including looking at CppCheck. Has anyone seen anything like this before?