4 # Determine configuration
5 export RUST_TEST_NOCAPTURE=1
6 export RUST_BACKTRACE=1
7 export RUSTFLAGS="-D warnings"
8 export CARGO_INCREMENTAL=0
9 export CARGO_EXTRA_FLAGS="--all-features"
12 echo "Build and install miri"
13 ./miri build --all-targets --locked
14 ./miri install # implicitly locked
19 if [ -n "${MIRI_TEST_TARGET+exists}" ]; then
20 echo "Testing foreign architecture $MIRI_TEST_TARGET"
22 echo "Testing host architecture"
26 if ! [ -n "${MIRI_TEST_TARGET+exists}" ]; then
27 # Only for host architecture: tests with MIR optimizations
28 # FIXME:only testing level 1 because of <https://github.com/rust-lang/rust/issues/73223>.
29 MIRI_TEST_FLAGS="-Z mir-opt-level=1" ./miri test --locked
31 # "miri test" has built the sysroot for us, now this should pass without
32 # any interactive questions.
33 ${PYTHON:-python3} test-cargo-miri/run-test.py
41 if [ "${TRAVIS_OS_NAME:-}" == linux ]; then
42 MIRI_TEST_TARGET=i686-unknown-linux-gnu run_tests
43 MIRI_TEST_TARGET=x86_64-apple-darwin run_tests
44 MIRI_TEST_TARGET=i686-pc-windows-msvc run_tests
45 elif [ "${TRAVIS_OS_NAME:-}" == osx ]; then
46 MIRI_TEST_TARGET=mips64-unknown-linux-gnuabi64 run_tests # big-endian architecture
47 MIRI_TEST_TARGET=x86_64-pc-windows-msvc run_tests
48 elif [ "${CI_WINDOWS:-}" == True ]; then
49 MIRI_TEST_TARGET=x86_64-unknown-linux-gnu run_tests
50 MIRI_TEST_TARGET=x86_64-apple-darwin run_tests
52 echo "FATAL: unknown CI platform"