When I run gcov then the output says 87% covered... then I want to use gcovr, but it does never work. I tried to run from many directories, with lots of options. In some cases, a few files I get coverage but not the file I want to see.
My project consists of 3 files:
src\main.c
src\makefile
tst\test1.c
tst\test2.c
tst\makefile
tst\obj\all
object files, gcno, gcda are stored here...build\build.bat
to make the project (windows)
Should I change the directory structure? How to see which version of gcov I should use? I want to see the coverage for main.c, but only get the coverage for test1.c and test2.c and those are not relevant for coverage!!
Next to the test files, I have include directories on C:\compiler which are not required for coverage.
I tried Python27:
python c:\python27\scripts\gcovr -g --object-directory=. -r ..\..\..\ --html --html-details -o program.html -v
I tried Python36:
c:\python36\scripts\gcovr --use-gcov-files -v --object-dir=.
But never get the coverage for my device under test. Only gcov without gcovr works, so the files must be correct.