-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Include doc tests in cargo test --all-targets #6671
Conversation
r? @Eh2406 (rust_highfive has picked a reviewer for you, use r? to override) |
I'm not necessarily opposed to this, but I think we should be careful with how to move forward with this. The issue is that I'd like to see a plan for how |
acbbb52
to
12e89ec
Compare
I think that's heavy-handed. The fact that doc-testing and testing are different "modes" is (IMHO) implementation detail of cargo/rustc. Do you agree |
I don't currently agree or disagree. Running doctests is different enough that I think they should be treated separately. For example, should I'll just dump some ideas here, but like I said I'm not happy with them. I'd just like to see a cohesive model for how it works without too many special cases. Method A:
Drawbacks here: I'm not sure if this is clear. If Method B:
Drawbacks is that this adds another flag, which is very undesirable. Method C:
Drawbacks is that I think the first case is confusing, and the last one is awkward. If you have any ideas how it should work long-term, I'd like to hear them (or if any of these don't sound horrible). I'm not completely opposed to making FWIW, from a use-case perspective, the "I want to test everything" use case would likely be served well by this change. However, I worry that if we enable doctesting for bins or examples, that |
How about |
It's a relatively obscure case right now. It adds running unit tests of examples (instead of just compiling them) and builds and runs benchmarks once. Both can be added to the defaults by setting |
Well #6669 is tagged for Command-test, so we can consider it when we fix the multiple test-related issues cargo has. |
Fixes #6669