I'm trying to get proper html output from gcovr when source file is located relative from my root directory.
For example (I will mention two cases where gcovr works, and where it has problems):
CASE:1 - gcovr works without problems My root directory is structured as follow,after I run gcovr from root with --html --html-details
source/myfile.c
obj/myfile.o, myfile.gcda, myfile.gcno, myfile.c.gcov
gcovr_reports/report.html, report_myfile.html
So everything is ok, and I have the html general report(report.html) as well as the detailed report (report_myfile.html).
CASE:2 - gcovr is not working properly My root directory is structured as follow,after I run gcovr from root with --html --html-details)
../../../Common/Source/myfile.c
obj/Common/Source/myfile.o, myfile.gcda,myfile.gcno,^#^#^#Common#Source#gcovmyfile.gcov
gcovr_reports/report.html, report.C
Now as you can see, gcovr generates the "report.C" file within the gcovr_report/ directory
Also the general html report (report.html) with the summary is created, but not the detailed one of my source file "myfile.c" . When I look into the obj directory it creates the following file (as you can see below):
^#^#^#Project#Common#Source#myfile.c.gcov
When I take a look into
^#^#^#Project#Common#Source#myfile.c.gcov,
the path is resolved as follow:
Source:../../../Project/Common/Source/myfile.c
but it should be:
Source:../../../../../../../Project/Common/Source/myfile.c
The gcovr command is:
C:\Python34\Scripts\gcovr -v -b -r C:\Project\UnitTests\myModule\module1 -- object-directory C:\Project\UTests\myModule\module1\test-obj\Common\Source -- html --html-details -o govr_report\report.html
Any idea what I'm doing wrong?