Closed AenBleidd closed 3 years ago
Ok, this is called ‘read documentation first before reporting bugs’.
Since gcc 8.1.0 release, source file is needed to generate correct coverage report. New compilation flag -fprofile-abs-path was introduced to preserve correct path to source file in *.gcno file.
On gcov 7.5.0 when source file is not found (and this is true because codecov is always running from the root folder, and src/gcda/gcno could be in subfolder), gcov file is generated with lines that has hit number but no source, and this file is processed correctly by codecov. On gcov 9.3.0 (I didn’t check versions between 7.5.0 and 9.3.0) when source file is not found, gcov file is generated empty (ok, almost empty, but the main is that it doesn’t contains any lines with hit number).
Looks like this could be a solution, but should be adapted to the codecov script: https://unix.stackexchange.com/q/218335
More info: https://community.codecov.io/t/lost-covered-lines-empty-tags-are-gone/2672/2