Search code examples
xmljenkinssonarqubebullseye

failing to publish bullseye coverage reports to SonarQube due to source file path changes


This image is a part of console output of sonarqube publisher job in jenkins: enter image description here

I am trying to publish bullseye coverage reports to sonarqube using analysis parameter as sonar.cxx.coverage.reportPath=Coverage.xml In the xml file Coverage.xml, the bullseye directory and source folder details are as below

!-- BullseyeCoverage 8.13.16 Windows x64 License 18830 --
BullseyeCoverage name="Result.cov" dir="c:/work/jenkins/workspace/CirrusFW_BullsEye_Main/" buildId="6861a17e2017-08-03 06:13:18" version="5" xmlns="http://www.bullseye.com/covxml"
fn_cov="54" fn_total="82" cd_cov="117" cd_total="347" d_cov="106" d_total="287"
folder name="Cirrus_FW" fn_cov="54" fn_total="82" cd_cov="117" cd_total="347" d_cov="106" d_total="287"
folder name="Src" fn_cov="54" fn_total="82" cd_cov="117" cd_total="347" d_cov="106" d_total="287"

so actual source file path is c:/work/jenkins/workspace/CirrusFW_BullsEye_Main/Cirrus_FW/Src

But in the console output, it is searching in the folder c:/work/jenkins/workspace/CirrusFW_BullsEye_Main/\Cirrus_FW\Src

it is adding /\ (one backslash and one forwardslash) in the path.

How to avoid this as we are not suppose to give that path, it will be taken from Coverage.xml file?


Solution

  • I added a powershell script to rebase the directory which is in that Coverage.xml file