diff --git a/test-cargo-miri/run-test.py b/test-cargo-miri/run-test.py index 60924d4f8dd..8edd947c3b0 100755 --- a/test-cargo-miri/run-test.py +++ b/test-cargo-miri/run-test.py @@ -102,7 +102,7 @@ def test_cargo_miri_test(): ) test("`cargo miri test` (subcrate, no isolation)", cargo_miri("test") + ["-p", "subcrate"], - "test.subcrate.stdout.ref", "test.stderr-empty.ref", + "test.subcrate.stdout.ref", "test.stderr-proc-macro.ref", env={'MIRIFLAGS': "-Zmiri-disable-isolation"}, ) diff --git a/test-cargo-miri/subcrate/Cargo.toml b/test-cargo-miri/subcrate/Cargo.toml index be27f88ad9a..ea2936d52a0 100644 --- a/test-cargo-miri/subcrate/Cargo.toml +++ b/test-cargo-miri/subcrate/Cargo.toml @@ -4,6 +4,10 @@ version = "0.1.0" authors = ["Miri Team"] edition = "2018" +[lib] +proc-macro = true +doctest = false + [[bin]] name = "subcrate" path = "main.rs" diff --git a/test-cargo-miri/subcrate/src/lib.rs b/test-cargo-miri/subcrate/src/lib.rs new file mode 100644 index 00000000000..706e368017c --- /dev/null +++ b/test-cargo-miri/subcrate/src/lib.rs @@ -0,0 +1,2 @@ +#[cfg(test)] +compile_error!("Miri should not touch me"); diff --git a/test-cargo-miri/test.stderr-proc-macro.ref b/test-cargo-miri/test.stderr-proc-macro.ref new file mode 100644 index 00000000000..4983250917b --- /dev/null +++ b/test-cargo-miri/test.stderr-proc-macro.ref @@ -0,0 +1 @@ +Running unit tests of `proc-macro` crates is not currently supported by Miri.