@@ -136,7 +136,7 @@ def test_cargo_miri_run():
136
136
cargo_miri ("run" ) + ["--target-dir=custom-run" , "--" , "--target-dir=target/custom-run" ],
137
137
"run.args.stdout.ref" , "run.custom-target-dir.stderr.ref" ,
138
138
)
139
- test ("`cargo miri run --package=test-local-crate-detection ` (test local crate detection)" ,
139
+ test ("`cargo miri run` (test local crate detection)" ,
140
140
cargo_miri ("run" ) + ["--package=test-local-crate-detection" ],
141
141
"run.local_crate.stdout.ref" , "run.local_crate.stderr.ref" ,
142
142
)
@@ -149,43 +149,44 @@ def test_cargo_miri_test():
149
149
150
150
test ("`cargo miri test`" ,
151
151
cargo_miri ("test" ),
152
- default_ref , "test.stderr- empty.ref" ,
152
+ default_ref , "test.empty.ref" ,
153
153
env = {'MIRIFLAGS' : "-Zmiri-seed=4242" },
154
154
)
155
155
test ("`cargo miri test` (no isolation, no doctests)" ,
156
156
cargo_miri ("test" ) + ["--bins" , "--tests" ], # no `--lib`, we disabled that in `Cargo.toml`
157
- "test.cross-target.stdout.ref" , "test.stderr- empty.ref" ,
157
+ "test.cross-target.stdout.ref" , "test.empty.ref" ,
158
158
env = {'MIRIFLAGS' : "-Zmiri-disable-isolation" },
159
159
)
160
160
test ("`cargo miri test` (with filter)" ,
161
161
cargo_miri ("test" ) + ["--" , "--format=pretty" , "pl" ],
162
- filter_ref , "test.stderr- empty.ref" ,
162
+ filter_ref , "test.empty.ref" ,
163
163
)
164
164
test ("`cargo miri test` (test target)" ,
165
165
cargo_miri ("test" ) + ["--test" , "test" , "--" , "--format=pretty" ],
166
- "test.test-target.stdout.ref" , "test.stderr- empty.ref" ,
166
+ "test.test-target.stdout.ref" , "test.empty.ref" ,
167
167
)
168
168
test ("`cargo miri test` (bin target)" ,
169
169
cargo_miri ("test" ) + ["--bin" , "cargo-miri-test" , "--" , "--format=pretty" ],
170
- "test.bin-target.stdout.ref" , "test.stderr- empty.ref" ,
170
+ "test.bin-target.stdout.ref" , "test.empty.ref" ,
171
171
)
172
172
test ("`cargo miri t` (subcrate, no isolation)" ,
173
173
cargo_miri ("t" ) + ["-p" , "subcrate" ],
174
- "test.subcrate.stdout.ref" , "test.stderr-proc-macro.ref" ,
174
+ "test.subcrate.cross-target.stdout.ref" if is_foreign else "test.subcrate.stdout.ref" ,
175
+ "test.empty.ref" ,
175
176
env = {'MIRIFLAGS' : "-Zmiri-disable-isolation" },
176
177
)
177
- test ("`cargo miri test` (subcrate, doctests )" ,
178
- cargo_miri ("test" ) + ["-p" , "subcrate" , "--doc " ],
179
- "test.stdout- empty.ref" , "test.stderr- proc-macro-doctest .ref" ,
178
+ test ("`cargo miri test` (proc-macro crate )" ,
179
+ cargo_miri ("test" ) + ["-p" , "proc_macro_crate " ],
180
+ "test.empty.ref" , "test.proc-macro.stderr .ref" ,
180
181
)
181
182
test ("`cargo miri test` (custom target dir)" ,
182
183
cargo_miri ("test" ) + ["--target-dir=custom-test" ],
183
- default_ref , "test.stderr- empty.ref" ,
184
+ default_ref , "test.empty.ref" ,
184
185
)
185
186
del os .environ ["CARGO_TARGET_DIR" ] # this overrides `build.target-dir` passed by `--config`, so unset it
186
187
test ("`cargo miri test` (config-cli)" ,
187
188
cargo_miri ("test" ) + ["--config=build.target-dir=\" config-cli\" " ],
188
- default_ref , "test.stderr- empty.ref" ,
189
+ default_ref , "test.empty.ref" ,
189
190
)
190
191
if ARGS .multi_target :
191
192
test_cargo_miri_multi_target ()
@@ -194,7 +195,7 @@ def test_cargo_miri_test():
194
195
def test_cargo_miri_multi_target ():
195
196
test ("`cargo miri test` (multiple targets)" ,
196
197
cargo_miri ("test" , targets = ["aarch64-unknown-linux-gnu" , "s390x-unknown-linux-gnu" ]),
197
- "test.multiple_targets.stdout.ref" , "test.stderr- empty.ref" ,
198
+ "test.multiple_targets.stdout.ref" , "test.empty.ref" ,
198
199
)
199
200
200
201
args_parser = argparse .ArgumentParser (description = '`cargo miri` testing' )
0 commit comments