I'm using gcov already to get code coverage results. I want to use gcovr. I've installed the gcovr package from Cygwin.
Now, I've never used Python.
I'm confused because I've got C:\cygwin\lib\python2.7\site-packages\gcovr
with init.py
, init.pyc
and init.pyo
files
Under C:\cygwin\bin
I've got a gcovr
file and also python.exe
I ran python.exe
from command prompt and it says Python 2.7.13 (default, Mar 14 2017, 23:27:55) [GCC 5.4.0] on cygwin
(is this what I have to use for gcovr?)
I tried >>>python2.7 gcovr
with the full gcovr path mentioned above and I get
SyntaxError: invalid syntax
I tried >>>gcovr
and I get
Traceback (most recent call last):
File (stdin); line 1, in (module)
NameError: name 'gcovr' is not defined
I went through the help utility and looked at all the modules, gcovr was one of them.
I've seen usage like ../../../scripts/gcovr -r
but I don't have a scripts folder.
What am I missing? What steps should I follow?
Try
gcovr -r ./
andgcovr -r ./ --branches
from the root folder where you have your .gcno and .gcda files to get the summary of line and branch coverage respectively