Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#46 [LCOV] geninfo doesn't work correctly with relative paths

open
nobody
Tools (8)
5
2010-05-03
2010-05-03
ctrlFR34K
No

When relative paths are used in coverage data geninfo the filenames read from *.gcov files are resolved using solve_relative_path which collapsed x/../y to y but relative paths read from *.gcno files are resolves using rel2abs which does not collapse this form of pattern.

The attached patch changes the code reading filenames from the *.gcno files to resolve the path using solve_relative_path. It also changes the glob which lists *.gcov files to also find those beginning with '.' since gcov-4.5.0 produces filenames of the form '..#path#to#source' if a relative path beginning '../' is found.

Discussion