@@ -114,15 +114,16 @@ def test_cargo_miri_test():
114
114
default_ref = "test.cross-target.stdout.ref" if is_foreign else "test.default.stdout.ref"
115
115
filter_ref = "test.filter.cross-target.stdout.ref" if is_foreign else "test.filter.stdout.ref"
116
116
117
+ # macOS needs permissive provenance inside getrandom.
117
118
test ("`cargo miri test`" ,
118
119
cargo_miri ("test" ),
119
120
default_ref , "test.stderr-empty.ref" ,
120
- env = {'MIRIFLAGS' : "-Zmiri-seed=feed" },
121
+ env = {'MIRIFLAGS' : "-Zmiri-permissive-provenance -Zmiri- seed=feed" },
121
122
)
122
123
test ("`cargo miri test` (no isolation, no doctests)" ,
123
124
cargo_miri ("test" ) + ["--bins" , "--tests" ], # no `--lib`, we disabled that in `Cargo.toml`
124
125
"test.cross-target.stdout.ref" , "test.stderr-empty.ref" ,
125
- env = {'MIRIFLAGS' : "-Zmiri-disable-isolation" },
126
+ env = {'MIRIFLAGS' : "-Zmiri-permissive-provenance -Zmiri- disable-isolation" },
126
127
)
127
128
test ("`cargo miri test` (with filter)" ,
128
129
cargo_miri ("test" ) + ["--" , "--format=pretty" , "le1" ],
@@ -131,6 +132,7 @@ def test_cargo_miri_test():
131
132
test ("`cargo miri test` (test target)" ,
132
133
cargo_miri ("test" ) + ["--test" , "test" , "--" , "--format=pretty" ],
133
134
"test.test-target.stdout.ref" , "test.stderr-empty.ref" ,
135
+ env = {'MIRIFLAGS' : "-Zmiri-permissive-provenance" },
134
136
)
135
137
test ("`cargo miri test` (bin target)" ,
136
138
cargo_miri ("test" ) + ["--bin" , "cargo-miri-test" , "--" , "--format=pretty" ],
@@ -148,11 +150,13 @@ def test_cargo_miri_test():
148
150
test ("`cargo miri test` (custom target dir)" ,
149
151
cargo_miri ("test" ) + ["--target-dir=custom-test" ],
150
152
default_ref , "test.stderr-empty.ref" ,
153
+ env = {'MIRIFLAGS' : "-Zmiri-permissive-provenance" },
151
154
)
152
155
del os .environ ["CARGO_TARGET_DIR" ] # this overrides `build.target-dir` passed by `--config`, so unset it
153
156
test ("`cargo miri test` (config-cli)" ,
154
157
cargo_miri ("test" ) + ["--config=build.target-dir=\" config-cli\" " , "-Zunstable-options" ],
155
158
default_ref , "test.stderr-empty.ref" ,
159
+ env = {'MIRIFLAGS' : "-Zmiri-permissive-provenance" },
156
160
)
157
161
158
162
os .chdir (os .path .dirname (os .path .realpath (__file__ )))
0 commit comments