g++ (Ubuntu 9.4.0-1ubuntu1~18.04) 9.4.0
gcov (Ubuntu 9.4.0-1ubuntu1~18.04) 9.4.0
lcov: LCOV version 1.13
The output:
Capturing coverage data from .
Found gcov version: 9.4.0
Scanning . for .gcda files ...
Found 1 data files in .
Processing main.gcda
geninfo: WARNING: /home/home/main.gcno: Overlong record at end of file!
geninfo: WARNING: cannot find an entry for main.cpp.gcov in .gcno file, skipping file!
Finished .info-file creation
The output:
genhtml: ERROR: no valid records found in tracefile main.info
So far I haven't managed to utilize lcov. Yet I've found a solution that works for me.
gcovr
https://github.com/gcovr/gcovr-fprofile-arcs -ftest-coverage -g -O0
-lgcov
)gcov-9 -b -l -p -c *.gcno
command. (If you're using cmake you will need to run this command recursively through all CMakeFiles/{all subfolders}.dir/src/* directories)gcovr {rootDir} -r {sourceDir} -g -k --html --html-details -o tp.html
rootDir - the directory you can access .gcov from. sourceDir - sources that shall be in tp.html report