Merge pull request #618 from RalfJung/cargo-miri

Fix cargo miri test on lib crates
This commit is contained in:
Ralf Jung 2019-02-07 18:03:47 +01:00 committed by GitHub
commit b1b9387c33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -338,9 +338,12 @@ fn in_cargo_miri() {
(MiriCommand::Test, "test") => {
cmd.arg("--test").arg(target.name);
}
(MiriCommand::Test, "lib") |
(MiriCommand::Test, "lib") => {
// There can be only one lib
cmd.arg("--lib").arg("--profile").arg("test");
}
(MiriCommand::Test, "bin") => {
cmd.arg(format!("--{}", kind)).arg(target.name).arg("--profile").arg("test");
cmd.arg("--bin").arg(target.name).arg("--profile").arg("test");
}
// The remaining targets we do not even want to build
_ => continue,