Skip to content

Commit 449925b

Browse files
committed
add tests for local crate detection
1 parent af47763 commit 449925b

File tree

7 files changed

+17
-1
lines changed

7 files changed

+17
-1
lines changed

test-cargo-miri/Cargo.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test-cargo-miri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
members = ["subcrate", "issue-1567", "exported-symbol-dep"]
2+
members = ["subcrate", "issue-1567", "exported-symbol-dep", "test-local-crate-detection"]
33
exclude = ["no-std-smoke"] # it wants to be panic="abort"
44

55
[package]

test-cargo-miri/run-test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ def test_cargo_miri_run():
131131
cargo_miri("run") + ["--target-dir=custom-run", "--", "--target-dir=target/custom-run"],
132132
"run.args.stdout.ref", "run.custom-target-dir.stderr.ref",
133133
)
134+
test("`cargo miri run --package=test-local-crate-detection` (test local crate detection)",
135+
cargo_miri("run") + ["--package=test-local-crate-detection"],
136+
"run.local_crate.stdout.ref", "run.local_crate.stderr.ref",
137+
)
134138

135139
def test_cargo_miri_test():
136140
# rustdoc is not run on foreign targets

test-cargo-miri/run.local_crate.stderr.ref

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[package]
2+
name = "test-local-crate-detection"
3+
version = "0.1.0"
4+
edition = "2021"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("{}", env!("MIRI_LOCAL_CRATES"));
3+
}

0 commit comments

Comments
 (0)