Dependencies for tests should not have panic set from the profile. However, using cargo build (instead of cargo test) does not correctly clear the panic flag for dependencies.
Repro:
cargo new --lib a
cd a
cat >> Cargo.toml <<EOL
[profile.dev]
panic = "abort"
EOL
mkdir tests
echo "extern crate a;" > tests/t1.rs
cargo build --test t1 -v
I can fix this as part of working on profiles if you'd like.