Skip to content

"clean" of data dir during compile phase is a confusing side-effect #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RichardBradley opened this issue Nov 12, 2014 · 2 comments
Closed

Comments

@RichardBradley
Copy link
Contributor

We have a multi-step build which has an "integration" test phase as well as a unit test phase.

We use scoverage to instrument these runs.

Currently (see a9aaf621e7, where no justification is given), a side-effect of scoverage:compile is to wipe the coverage data so far.

This is a surprising side-effect of a "compile" command.

  1. Why does scoverage do this?
  2. Should it stop doing so?

Thanks

(This doesn't currently cause problems for us in general, as we don't recompile the app between the various test runs described above. However we do have one dev machine which is playing up and recompiling the app when it shouldn't. That machine is reporting incorrect coverage data, and it took me ages to track down why.)

@sksamuel
Copy link
Member

I think it was because if you run scoverage:compile over the top and a statement was removed / added, the id numbers used for statements in the subsequent run would clash.

@RichardBradley
Copy link
Contributor Author

Makes sense -- that is a good reason.

I'll see if I can track down what is modifying the source files on this guy's pc between test runs -- that's the real bug here.

I might add a better code comment to this line if I get time, to explain why scoverage does that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants