Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does coveralls show 0% coverage when every source file is 100% covered?

I made a simple C++ project which I hooked up to travis and coveralls. As far as I know, I'm uploading the reports correctly as my source files are shown in coveralls and are 100% covered.

However, the project coverage shows 0%. Why, and how to fix?

enter image description here

like image 253
learnvst Avatar asked Jan 27 '26 20:01

learnvst


1 Answers

This is due to mismatched gcov and g++ versions.

The build logs give the following messages

adder.cpp.gcno:version '408*', prefer '406*'

This is why the columns all register 0 in the above screenshot. When the gcov and g++ versions match, the output looks like the following

enter image description here

Coveralls just makes this error a little tricky to uncover because each file is flagged as 100% covered if there are no relevant lines, but the summary shows 0% for this state

like image 197
learnvst Avatar answered Jan 30 '26 10:01

learnvst



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!