killy971 / hpc-coveralls

coveralls.io support for haskell code coverage with hpc
http://hackage.haskell.org/package/hpc-coveralls
BSD 3-Clause "New" or "Revised" License
60 stars 20 forks source link

"hpc-coveralls test" returns exit code 0 even on error #7

Closed nurpax closed 10 years ago

nurpax commented 10 years ago

In build https://travis-ci.org/nurpax/snaplet-sqlite-simple/builds/22389915, hpc-coveralls test hits an error due to a wrong current working dir. It prints an error and then exits with exit code 0, which fools Travis CI thinking everything worked fine.

The correct behavior would be to return a non-zero exit code in this case.

killy971 commented 10 years ago

This can indeed be made to return a non-zero exit code, but anyway, Travis CI won't consider the build as failed because hpc-coveralls is executed as part of the after_script phase.

The purpose of this is to be not too intrusive, considering the possible problems still existing in this experimental version at the moment.

Travis CI would mark the build as failed if this was executed as part of the script phase.

Anyway, I don't think it should be too difficult to implement, so I'll have a look at it soon. Thanks for reporting this!

killy971 commented 10 years ago

Fixed by 5507ed0054f73a4390da0c6455e645fba8747caf Will be released with v2.0.0

killy971 commented 10 years ago

I just noticed that Travis doesn't display the exit code of commands run in the after_script phase, as only the commands run in the script are taken in consideration for determining if the build succeeded or failed.

hpc-coveralls-travis-tix-not-found