2

I try to create a coverage report. I use

make clean all and make coverage.

I have Boost and lcov installed. But when I try make coverage it fails with the following error message:

Processing components/Project/CMakeFiles/ProjectMainController.dir/dataHandling/savingUnit/Trimmer.cpp.gcda
geninfo: ERROR: /home/user/ProjectFolder/Project/build/source/Project/components/Project/CMakeFiles/ProjectMainController.dir/dataHandling/savingUnit/Trimmer.cpp.gcno: reached unexpected end of file
make[3]: *** [CMakeFiles/coverage] Error 255
make[2]: *** [CMakeFiles/coverage.dir/all] Error 2
make[1]: *** [CMakeFiles/coverage.dir/rule] Error 2

The strange part is: I havent even written any tests for the Trimmer class and there isnt even a TrimmerTest file. Can you help me?

Peter111
  • 803
  • 3
  • 11
  • 21

2 Answers2

1

Fixed the problem by completly deleting the content of the build folder

Peter111
  • 803
  • 3
  • 11
  • 21
1

To fix this issue, you can try another version of lcov such as version 1.0

Hieu Dang
  • 136
  • 1
  • 6