add tests for local crate detection

This commit is contained in:
Paul Gey 2024-05-28 23:07:44 +02:00
parent d5235f91ad
commit a963103898
7 changed files with 17 additions and 1 deletions

View file

@ -123,6 +123,10 @@ dependencies = [
"byteorder 1.5.0",
]
[[package]]
name = "test-local-crate-detection"
version = "0.1.0"
[[package]]
name = "unicode-ident"
version = "1.0.12"

View file

@ -1,5 +1,5 @@
[workspace]
members = ["subcrate", "issue-1567", "exported-symbol-dep"]
members = ["subcrate", "issue-1567", "exported-symbol-dep", "test-local-crate-detection"]
exclude = ["no-std-smoke"] # it wants to be panic="abort"
[package]

View file

@ -131,6 +131,10 @@ def test_cargo_miri_run():
cargo_miri("run") + ["--target-dir=custom-run", "--", "--target-dir=target/custom-run"],
"run.args.stdout.ref", "run.custom-target-dir.stderr.ref",
)
test("`cargo miri run --package=test-local-crate-detection` (test local crate detection)",
cargo_miri("run") + ["--package=test-local-crate-detection"],
"run.local_crate.stdout.ref", "run.local_crate.stderr.ref",
)
def test_cargo_miri_test():
# rustdoc is not run on foreign targets

View file

@ -0,0 +1 @@
subcrate,issue_1567,exported_symbol_dep,test_local_crate_detection,cargo_miri_test,cdylib,exported_symbol,issue_1691,issue_1705,issue_rust_86261,proc_macro_crate

View file

@ -0,0 +1,4 @@
[package]
name = "test-local-crate-detection"
version = "0.1.0"
edition = "2021"

View file

@ -0,0 +1,3 @@
fn main() {
println!("{}", env!("MIRI_LOCAL_CRATES"));
}