-
Notifications
You must be signed in to change notification settings - Fork 101
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
Concrete playback needs tweak for harnesses under cfg(test)
#1577
Comments
One easy fix is to update the instructions to suggest conditionally adding [target.'cfg(not(kani))'.dev-dependencies]
kani = { git = "https://github.com/model-checking/kani", features = ["concrete_playback"] } |
That's an interesting one... There's definitely a conflict between It feels a bit counter intuitive to add #[cfg(kani)]
mod harnesses {
#[kani:proof]
fn my_harness() {}
// Test will be here.
} |
Ran into this issue while adding the concrete playback button for the extension, this causes all cfg(test) or #[test] cases to crash and it gives the same underlying error. |
I've confirmed that #2464 did indeed fix this. Steps:
If you don't change the contents of |
The current instructions for the concrete playback feature include adding
kani
in thedev-dependencies
section. If the harness of interest is under#[cfg(test)]
, thencargo kani
needs to be run with the--tests
option. However, including--tests
results in trying to compile the Kani crate with Kani! This fails with the following error:The workaround I've used is to remove
kani
from thedev-dependencies
, before runningcargo kani
, then add it back before running debugging the generated harness.Steps to reproduce:
cargo new --lib conc_playback
cd conc_playback
kani
todev-dependencies
inCargo.toml
:cargo kani --tests
The text was updated successfully, but these errors were encountered: