learnvst
learnvst

Reputation: 16195

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

Upvotes: 3

Views: 1092

Answers (1)

learnvst
learnvst

Reputation: 16195

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

Upvotes: 3

Related Questions