mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
attempt to test RUSTC and RUSTC_WRAPPER shenanigans on CI
This commit is contained in:
parent
25b11f6424
commit
7267e0d4c5
@ -483,6 +483,7 @@ path = "lib.rs"
|
||||
// The `MIRI_CALLED_FROM_XARGO` will mean we dispatch to `phase_setup_rustc`.
|
||||
let cargo_miri_path = std::env::current_exe().expect("current executable path invalid");
|
||||
if env::var_os("RUSTC_STAGE").is_some() {
|
||||
assert!(env::var_os("RUSTC").is_some());
|
||||
command.env("RUSTC_REAL", &cargo_miri_path);
|
||||
} else {
|
||||
command.env("RUSTC", &cargo_miri_path);
|
||||
|
13
ci.sh
13
ci.sh
@ -38,8 +38,21 @@ function run_tests {
|
||||
else
|
||||
PYTHON=python
|
||||
fi
|
||||
# Some environment setup that attempts to confuse the heck out of cargo-miri.
|
||||
if [ "$HOST_TARGET" = x86_64-unknown-linux-gnu ]; then
|
||||
# These act up on Windows (`which miri` produces a filename that does not exist?!?),
|
||||
# so let's do this only on Linux. Also makes sure things work without these set.
|
||||
export RUSTC=$(which rustc)
|
||||
export MIRI=$(which miri)
|
||||
fi
|
||||
mkdir -p .cargo
|
||||
echo 'build.rustc-wrapper = "thisdoesnotexist"' > .cargo/config.toml
|
||||
# Run the actual test
|
||||
${PYTHON} test-cargo-miri/run-test.py
|
||||
echo
|
||||
# Clean up
|
||||
unset RUSTC MIRI
|
||||
rm -rf .cargo
|
||||
|
||||
# Ensure that our benchmarks all work, on the host at least.
|
||||
if [ -z "${MIRI_TEST_TARGET+exists}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user