JuliaCI / Coverage.jl

Take Julia code coverage and memory allocation results, do useful things with them
MIT License
174 stars 68 forks source link

Coverage information does not seem to be right #187

Closed ronisbr closed 5 years ago

ronisbr commented 5 years ago

Hi guys!

After the new version of Coverage, the coverage information does not seem to be right. Take a look, for example, at the function compose_rotation here:

https://coveralls.io/builds/19787299/source?filename=src/compose_rotations.jl#L53

It says that it is not tested at all. However, take a look at the test here:

https://github.com/JuliaSpace/ReferenceFrameRotations.jl/blob/6fd8162b51958ed809fe36c268eb11bd0a506a43/test/test_compose_rotations_quaternions.jl#L49

The last version of Coverage was saying that ReferenceFrameRotations.jl has a coverage of 100% and now it is 74%.

Notice that the same thing happened with Codecov.

sbromberger commented 5 years ago

ah, never mind. We tried both ways in LG and I concluded that we're going to not include the DISABLE flag. We get accurate and good results without it.

ararslan commented 5 years ago

I think we could close this now... @ararslan ?

I think you're in the best position to determine whether this is sufficiently resolved, so I trust your judgement on whether this should be closed.

fingolfin commented 5 years ago

I'll close it then; but of course anybody is free to open a new issue if they still see problems anywhere

adamglos92 commented 5 years ago

I have still one small issue: one line (which is uncovered and next to another uncovered line) seems to be not considered, i.e. in coveralls it is not marked. https://coveralls.io/builds/22042972/source?filename=src/qwdynamics/qwsearch/maximizing_function.jl#L65

adamglos92 commented 5 years ago

Similarly one line which should be marked as covered is not marked https://coveralls.io/builds/22042972/source?filename=src/qwmodels/szegedy/szegedy_stochastic.jl#L68

fingolfin commented 5 years ago

@adamglos92 Are you sure that line 65 in your first example is executed? Have you verified it, e.g. by printing or throwing an exception there? As to the second example: I only see a line of code that is not marked as code, so neither marked as covered nor as uncovered. The cause of this has been discussed extensively in this PR, and also is discussed in the README.md section on DISABLE_AMEND_COVERAGE_FROM_SRC.

adamglos92 commented 5 years ago

@fingolfin It is not, but I think I get the idea now. So if in case there is multiple lines weren't executed, it is not promised that each is marked as uncovered. Can I expect that at least one (as in my case) is marked as uncovered? Please ignore second example, the README.md clarifies it.