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 reported as 0% when using cargo test --all #5

Open
euclio opened this issue Feb 26, 2017 · 11 comments
Open

Coverage reported as 0% when using cargo test --all #5

euclio opened this issue Feb 26, 2017 · 11 comments

Comments

@euclio
Copy link

euclio commented Feb 26, 2017

See report here: rust-rosetta/rust-rosetta#563

@roblabla
Copy link
Owner

Looking into it

@roblabla
Copy link
Owner

https://travis-ci.org/Hoverbear/rust-rosetta/builds/205573979#L4329 Cargo coveralls isn't running any tests :|

@roblabla
Copy link
Owner

could you try cargo coveralls --all ?

@euclio
Copy link
Author

euclio commented Feb 26, 2017

Build log with cargo coveralls --all: https://travis-ci.org/Hoverbear/rust-rosetta/builds/205580675

@roblabla
Copy link
Owner

roblabla commented Feb 26, 2017

So at least this time it ran the tests. The problem is, kcov seems to choke when trying to open some directories. I cloned your repo and managed to reproduce the issue. I'll play around with it and report back when I get it to work :).

@roblabla
Copy link
Owner

So this problem is due to the way workspaces work. The "target" directory isn't next to the cwd() in this case. I'm refactoring the code to use cargo methods to recover the location of the "target" directory. This should be much more robust, and allow it to also support things like CARGO_TARGET_DIR

@roblabla
Copy link
Owner

0.0.3 is published on crates.io. If you run the builds again, it should work.

@euclio
Copy link
Author

euclio commented Feb 26, 2017

Ah, thank you for the quick work! It recorded coverage, but also took the coverage of some library dependencies (...? I see glium, glutin etc. in the covered files). So, it's giving incorrect coverage. Coverage log here: https://coveralls.io/builds/10337936

@roblabla
Copy link
Owner

You're right. It seems that it's more problems with workspaces. I'm investigating.

@roblabla roblabla reopened this Feb 26, 2017
@roblabla
Copy link
Owner

Fixed with 2581789 . 0.0.4 released.

@roblabla
Copy link
Owner

roblabla commented Mar 2, 2017

Woops. This wasn't quite fixed, and I forgot to reopen it.

https://coveralls.io/builds/10347968 It's really weird, coveralls seems eager to include files that are not in the include-path. I need to investigate this more. I'll try to go over it this week-end.

@roblabla roblabla reopened this Mar 2, 2017
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