Skip to content
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

Coverage data for individual test suites is mangled when running multiple test suites #1327

Closed
ElectronicRU opened this issue Sep 15, 2016 · 3 comments · Fixed by #1332
Closed
Labels
minor bug bug that does not prevent major features from working

Comments

@ElectronicRU
Copy link

Current behaviour

When using several testing frameworks (the case at least with EUnit, Common Test, and PropEr) with rebar3, the total coverage data is calculated right, but per-method (?) coverage shown is actually + <that method's coverage>.

Expected behaviour

All coverages are calculated correctly.

Proof of concept

https://bitbucket.org/0player/cover_test

@ferd
Copy link
Collaborator

ferd commented Sep 15, 2016

Sounds like a variation of what was fixed by merging #1316.

This means that while rebar3 do ct -c, eunit -c, proper -c, cover works fine, running them individually in a sequence still shows the problem.

@ferd ferd added the minor bug bug that does not prevent major features from working label Sep 15, 2016
@ferd
Copy link
Collaborator

ferd commented Sep 15, 2016

Fun fact: running the following also causes the issue:

$ rebar3 do ct -c, eunit -c, proper -c
$ rebar3 cover

I'm guessing something funny happens with a freshly started cover server that does not happen with a previously running one, despite the following procedure to load cover data being fully identical in all cases.

rebar3 do eunit -c, ct -c && rebar3 do proper -c, cover also works fine. Starting to wonder if there's something in cover compilation that primes the cover pid properly and doesn't happen on a single cover run.

@ElectronicRU
Copy link
Author

Turns out to load coverdata properly, you need to have relevant modules cover-compiled. Forcing a cover compilation on rebar3 cover does fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor bug bug that does not prevent major features from working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants