-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Possibility to support CLIs' integration tests? #105
Comments
Do you have any examples of tests using |
Sure. Using an First crate the app: Add a integration test using
Here is the result of tarpaulin:
The |
This is definitely due to cargo run. Part of me hoped it would be as easy as removing the |
It looks like tarpaulin doesn't support multiprocess tracing. When a test execs another process, tarpaulin detaches ptrace from it. Other parts of the code only focus on single-process tracing. For example, |
I did try and do some work on this a month ago or so which I summarised some things from here #107 and started here https://github.com/xd009642/tarpaulin/tree/follow_spawned_processes though I haven't pushed anything apart from a test. Party of the problem I have to tackle is when a process is launched I need to stop it, get it's executable name and figure out if it's something I can instrument? (Is it in the target folder), instrument it and then potentially handle both two machines. |
If this involves fork it won't work yet, but if it just executes another process I should have a working prototype of following process exec's on #615 if you want to try it out. So far I've just tried it on a very simple toy project so more people testing it is appreciated 😄. Adding fork support should be trivial and a next step |
So I don't yet follow fork children. But I follow fork parents and execed processes now. I tried on assert_cmd and got some coverage but I did notice fork events so may not quite be as thorough as you'd want. I'm just going to close this in favour of a more specific issue for forks as they're the current missing piece. #616 |
Anyone finding this issue via search. Use |
Any chance to support CLI app's integration tests? For example,
tarpaulin
won't calculate coverage when usingassert_cli
https://github.com/assert-rs/assert_cli to fork and execute CLI and test. Thanks.Related discussion: https://github.com/rust-lang-nursery/cli-wg/issues/9#issuecomment-385487756
The text was updated successfully, but these errors were encountered: