Must-share information (formatted with Markdown):
- which versions are you using: SonarScanner 4.3.0.2102 | SonarQube server 7.9.4 | gcov (GCC) 4.8.5 20150623 | gcc version 4.8.5 20150623
- what are you trying to achieve | I want to have coverage report from my project
- what have you tried so far to achieve this: I used build-wrapper for my project, then I build and executed google tests, I also created *.gcov files (used gcov) out of these tests needed for coverity and put them in a common directory({WORKSPACE}/gcov_common). Then I set `sonar.cfamily.gcov.reportsPath` to point to that directory, lets say -Dsonar.cfamily.gcov.reportsPath={WORKSPACE}/gcov_common, then Sensor gcov [cpp] says INFO: Parsing /home/user/dir/gcov_common/example.gcov
File not analysed by Sonar, so ignoring coverage: /home/user/dir/gw/example_test.cpp (test is in different directory eg. /home/user/dir/xx/xx/xx/xx/tests) .
I can force sonnarQube to get coverity by setting sonar.cfamily.gcov.reportsPath
to the directory where test really is (and also gcov files) eg. /home/user/dir/xx/xx/xx/xx/tests, but then I’ll get coverity only for that folder, but I have tests in many other directories eg. /home/user/dir/yy/yy/yy/tests.
I tried to put all test-file.cpp and .gcov files in common directory but this didn’t help,
I can’t pass multiple paths to sonar.cfamily.gcov.reportsPath. For now this seems to me to be impossible to get this coverage report works for whole project, or I must miss something.
{WORKSPACE} is /home/user/dir/ sonar.projectBaseDir={WORKSPACE}/xx
Regards,
Fabian