Gcov results not upload to sonar

Must-share information (formatted with Markdown):

  • version 8.0.0.29455
  • publish gcov code coverage results to sonarqbue
  • all i can find on line

I’m generating gcov files at location: build/gcov-reports
Here is sonar-project.properties

sonar.sources=src

sonar.cfamily.build-wrapper-output=bw

sonar.sourceEncoding=UTF-8

sonar.cfamily.gcov.reportsPath=build/gcov-reports

here is point.c.gcov content:
-: 0:Source:src/point.c
-: 0:Graph:build/gcov/out/point.gcno
-: 0:Data:build/gcov/out/point.gcda
-: 0:Runs:4
-: 0:Programs:1
-: 1:#include “point.h”
-: 2:
4: 3:struct point MakePoint(int x, int y)
-: 4:{
-: 5: struct point pt;
4: 6: pt.x = x;
4: 7: pt.y = y;
4: 8: return pt;
-: 9:}

During execution I get this in the log:
INFO: Parsing /app/build/gcov-reports/point.c.gcov

WARN: File not analysed by Sonar, so ignoring coverage: /app/build/gcov-reports/src/point.c

Any help would be great.

Thanks,
Ken

hi @ken,

I think you might be hitting a similar issue to the one I found a few months ago, Using Relative Paths With GCOV Sensor.

–Mark

2 Likes

Hi @ken,

:+1:

You can follow the following ticket: CPP-2231.

1 Like

Thanks @scmbuildguy , that was the issue

Thanks @mpaladin