Closed oshaughnessya closed 5 months ago
Hmm, Apparently cargo test
wants to also test the binaries... This is new to me, but is has probably been there for a while.
Adding the following to Cargo.toml
helps as a workaround.
[[bin]]
name = "embedded-example-test"
path = "src/main.rs"
test = false
For me, running cargo test
hardly makes sense anyways, because I usually have unit tests that will only compile for x86 and integrations test that will only compile for the target. So I prefer to run cargo test --lib
and cargo test --tests
with the respective --target <...>
I'll keep this task open, until I've added this info to the README and/or changed the example
Closing this, as this is now updated in the example repo and also added to the FAQ in the wiki
Cargo Version: v1.78.0-nightly and 1.76.0-stable
probe-rs 0.22.0 git commit: 0f2eeb29
Reproducibility: Using the embedded-test-example repository on the stm32f4 branch, add a main.rs, I am using
after
src/main.rs
exists, runcargo test
. You should get an error sayingFull output of
cargo test
is here.