I'm are trying to setup lcov on a local Windows computer using cygwin and the bash shell. I installed the newest version of lcov downloaded from here: lcov at sourceforge.
When I call a specific gcda file, then I get an output.
The call is: lcov -c -d FileName.gcda -o outputfile.info
As far as I read usually lcov shall be able to iterate over all gcda files in a folder. My call for rotating over all gcda files is:
lcov -c -d . -o outputfile.info
With the above code I get the following output:
Capturing coverage data from .
Found gcov version 6.4.0
Scanning . for .gcda files ...
geninfo: WARNING: no .gcda files found in . - skipping!
Finished .info-file creation
Here a screenshot:
As can be seen, there is a CanAdapter.gcda and CanAdapter.gcno, but with the configuration above geninfo produces a failure.
When I try to make a call like this:
lcove -c -d *.gcda -o outputfile.info
I get the following answer:
lcov: Extra parameter found: 'FileName2.gcda'
Use lcov --help to get usage information
I read the help, and it doesn't help as much as I need.
I found the answer to my problem.
On windows machine there are two possibilities to run lcov.
lcov -c -d /cygdrive/c/path where the gcda files are located -o /cygdrive/c/path where the output folder is located/lcov.info
The same is to do with genhtml to create the html file.
sh -c -l "lcov -c -d /cygdrive/c/path where the gcda files are located -o /cygdrive/c/path where the output folder is located/lcov.info"
It is important to write
sh -c -l
and the lcov command in
" "
otherwise lcov and genhtml wont work.