set -euo pipefail
# Determine configuration
-export RUST_TEST_NOCAPTURE=1
-export RUST_BACKTRACE=1
export RUSTFLAGS="-D warnings"
export CARGO_INCREMENTAL=0
export CARGO_EXTRA_FLAGS="--all-features"
./miri test --locked
if [ -z "${MIRI_TEST_TARGET+exists}" ]; then
- # Only for host architecture: tests with MIR optimizations
- MIRIFLAGS="-Z mir-opt-level=3" ./miri test --locked
+ # Only for host architecture: tests with optimizations (`-O` is what cargo passes, but crank MIR
+ # optimizations up all the way).
+ MIRIFLAGS="-O -Zmir-opt-level=4" ./miri test --locked
fi
# On Windows, there is always "python", not "python3" or "python2".
case $HOST_TARGET in
x86_64-unknown-linux-gnu)
MIRI_TEST_TARGET=i686-unknown-linux-gnu run_tests
- MIRI_TEST_TARGET=x86_64-apple-darwin run_tests
+ MIRI_TEST_TARGET=aarch64-apple-darwin run_tests
MIRI_TEST_TARGET=i686-pc-windows-msvc run_tests
;;
x86_64-apple-darwin)