@@ -51,7 +51,7 @@ def test(name, cmd, stdout_ref, stderr_ref, stdin=b'', env={}):
51
51
def test_cargo_miri_run ():
52
52
test ("`cargo miri run` (no isolation)" ,
53
53
cargo_miri ("run" ),
54
- "stdout.ref1 " , "stderr.ref1 " ,
54
+ "run.default. stdout.ref " , "run.default. stderr.ref " ,
55
55
stdin = b'12\n 21\n ' ,
56
56
env = {
57
57
'MIRIFLAGS' : "-Zmiri-disable-isolation" ,
@@ -60,44 +60,49 @@ def test_cargo_miri_run():
60
60
)
61
61
test ("`cargo miri run` (with arguments and target)" ,
62
62
cargo_miri ("run" ) + ["--bin" , "cargo-miri-test" , "--" , "hello world" , '"hello world"' ],
63
- "stdout.ref2 " , "stderr.ref2 " ,
63
+ "run.args. stdout.ref " , "run.args. stderr.ref " ,
64
64
)
65
65
test ("`cargo miri run` (subcrate, no ioslation)" ,
66
66
cargo_miri ("run" ) + ["-p" , "subcrate" ],
67
- "stdout.ref3 " , "stderr.ref3 " ,
67
+ "run.subcrate. stdout.ref " , "run.subcrate. stderr.ref " ,
68
68
env = {'MIRIFLAGS' : "-Zmiri-disable-isolation" },
69
69
)
70
70
71
71
def test_cargo_miri_test ():
72
72
# rustdoc is not run on foreign targets
73
73
is_foreign = 'MIRI_TEST_TARGET' in os .environ
74
- rustdoc_ref = "test.stderr.ref2 " if is_foreign else "test.stderr.ref1 "
74
+ rustdoc_ref = "test.stderr-empty.ref " if is_foreign else "test.stderr-rustdoc.ref "
75
75
76
76
test ("`cargo miri test`" ,
77
77
cargo_miri ("test" ),
78
- "test.stdout.ref1 " , rustdoc_ref ,
78
+ "test.default. stdout.ref " , rustdoc_ref ,
79
79
env = {'MIRIFLAGS' : "-Zmiri-seed=feed" },
80
80
)
81
81
test ("`cargo miri test` (no isolation)" ,
82
82
cargo_miri ("test" ),
83
- "test.stdout.ref1 " , rustdoc_ref ,
83
+ "test.default. stdout.ref " , rustdoc_ref ,
84
84
env = {'MIRIFLAGS' : "-Zmiri-disable-isolation" },
85
85
)
86
+ test ("`cargo miri test` (raw-ptr tracking)" ,
87
+ cargo_miri ("test" ) + ["--" , "-Zunstable-options" , "--exclude-should-panic" ],
88
+ "test.raw-ptr-track.stdout.ref" , rustdoc_ref ,
89
+ env = {'MIRIFLAGS' : "-Zmiri-track-raw-pointers" },
90
+ )
86
91
test ("`cargo miri test` (with filter)" ,
87
92
cargo_miri ("test" ) + ["--" , "--format=pretty" , "le1" ],
88
- "test.stdout.ref2 " , rustdoc_ref ,
93
+ "test.filter. stdout.ref " , rustdoc_ref ,
89
94
)
90
95
test ("`cargo miri test` (test target)" ,
91
96
cargo_miri ("test" ) + ["--test" , "test" , "--" , "--format=pretty" ],
92
- "test.stdout.ref3 " , "test.stderr.ref2 " ,
97
+ "test.test-target. stdout.ref " , "test.stderr-empty.ref " ,
93
98
)
94
99
test ("`cargo miri test` (bin target)" ,
95
100
cargo_miri ("test" ) + ["--bin" , "cargo-miri-test" , "--" , "--format=pretty" ],
96
- "test.stdout.ref4 " , "test.stderr.ref2 " ,
101
+ "test.bin-target. stdout.ref " , "test.stderr-empty.ref " ,
97
102
)
98
103
test ("`cargo miri test` (subcrate, no isolation)" ,
99
104
cargo_miri ("test" ) + ["-p" , "subcrate" ],
100
- "test.stdout.ref5 " , "test.stderr.ref2 " ,
105
+ "test.subcrate. stdout.ref " , "test.stderr-empty.ref " ,
101
106
env = {'MIRIFLAGS' : "-Zmiri-disable-isolation" },
102
107
)
103
108
0 commit comments