File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -483,6 +483,7 @@ path = "lib.rs"
483
483
// The `MIRI_CALLED_FROM_XARGO` will mean we dispatch to `phase_setup_rustc`.
484
484
let cargo_miri_path = std:: env:: current_exe ( ) . expect ( "current executable path invalid" ) ;
485
485
if env:: var_os ( "RUSTC_STAGE" ) . is_some ( ) {
486
+ assert ! ( env:: var_os( "RUSTC" ) . is_some( ) ) ;
486
487
command. env ( "RUSTC_REAL" , & cargo_miri_path) ;
487
488
} else {
488
489
command. env ( "RUSTC" , & cargo_miri_path) ;
Original file line number Diff line number Diff line change @@ -38,8 +38,21 @@ function run_tests {
38
38
else
39
39
PYTHON=python
40
40
fi
41
+ # Some environment setup that attempts to confuse the heck out of cargo-miri.
42
+ if [ " $HOST_TARGET " = x86_64-unknown-linux-gnu ]; then
43
+ # These act up on Windows (`which miri` produces a filename that does not exist?!?),
44
+ # so let's do this only on Linux. Also makes sure things work without these set.
45
+ export RUSTC=$( which rustc)
46
+ export MIRI=$( which miri)
47
+ fi
48
+ mkdir -p .cargo
49
+ echo ' build.rustc-wrapper = "thisdoesnotexist"' > .cargo/config.toml
50
+ # Run the actual test
41
51
${PYTHON} test-cargo-miri/run-test.py
42
52
echo
53
+ # Clean up
54
+ unset RUSTC MIRI
55
+ rm -rf .cargo
43
56
44
57
# Ensure that our benchmarks all work, on the host at least.
45
58
if [ -z " ${MIRI_TEST_TARGET+exists} " ]; then
You can’t perform that action at this time.
0 commit comments