miri: `cargo miri test` does not run doc-tests
I am not sure what it would take to also make it build and execute doc-tests. Probably just some tweaks in how we wrap cargo rustc?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 35 (28 by maintainers)
Commits related to this issue
- Auto merge of #1540 - RalfJung:cargo-miri-redone, r=<try> Redo cargo-miri logic This rewrite the cargo-miri logic for running the requested crate(s) following what we outlined in https://github.com/... — committed to rust-lang/miri by bors 4 years ago
- Auto merge of #1540 - RalfJung:cargo-miri-redone, r=<try> Redo cargo-miri logic This rewrite the cargo-miri logic for running the requested crate(s) following what we outlined in https://github.com/... — committed to rust-lang/miri by bors 4 years ago
- Auto merge of #1540 - RalfJung:cargo-miri-redone, r=<try> Redo cargo-miri logic This rewrite the cargo-miri logic for running the requested crate(s) following what we outlined in https://github.com/... — committed to rust-lang/miri by bors 4 years ago
- Auto merge of #1540 - RalfJung:cargo-miri-redone, r=oli-obk Redo cargo-miri logic This rewrite the cargo-miri logic for running the requested crate(s) following what we outlined in https://github.co... — committed to rust-lang/miri by bors 4 years ago
- Auto merge of #1757 - RalfJung:rustdoc, r=RalfJung add rustdoc support `@teryror` did all the work in https://github.com/rust-lang/miri/pull/1671; I just finished things up and fixed conflicts. Also... — committed to rust-lang/miri by bors 3 years ago
I don’t think
ignoredoes anything for doctests.Did you try
#[cfg(not(miri))]?Awesome. 😃 Don’t hesitate to ask if you have further questions. (But also, I might not always be able to answer so quickly, so when delays happen that’s just because I am busy.)
Judging from
--test-builder, I think rustdoc is only building binaries, not running them. So likely Miri should make rustdoc invoke miri as the builder and make sure that this rustdoc-invoked Miri entersphase_cargo_rustc. Assuming this is always a binary crate, this would make Miri emit a JSON file as the “binary” with all the required information that is needed later when cargo tells Miri to “run” that JSON file.