1- #! /bin/sh
1+ #! /bin/bash
22# ignore-tidy-file-linelength
33
44set -eu
@@ -15,6 +15,8 @@ if [ -z "${PR_CI_JOB:-}" ]; then
1515else
1616 python3 " $X_PY " test --stage 2 miri cargo-miri
1717fi
18+ # Run the test suite again with mir optimizations, to catch some miscompilations.
19+ MIRIFLAGS=" -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 python3 " $X_PY " test --stage 2 miri -- tests/{pass,panic}
1820# We natively run this script on x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc.
1921# Also cover some other targets via cross-testing, in particular all tier 1 targets.
2022case $HOST_TARGET in
@@ -23,13 +25,12 @@ case $HOST_TARGET in
2325 # Fully test all main OSes, and all main architectures.
2426 python3 " $X_PY " test --stage 2 miri cargo-miri --target aarch64-apple-darwin
2527 python3 " $X_PY " test --stage 2 miri cargo-miri --target i686-pc-windows-msvc
26- # Only run "pass" tests for the remaining targets, which is quite a bit faster.
27- # We have to use `miri` instead of `src/tools/miri` here to avoid also running the cargo-miri
28- # tests.
29- python3 " $X_PY " test --stage 2 miri --target x86_64-pc-windows-gnu --test-args pass
30- python3 " $X_PY " test --stage 2 miri --target i686-unknown-linux-gnu --test-args pass
31- python3 " $X_PY " test --stage 2 miri --target aarch64-unknown-linux-gnu --test-args pass
32- python3 " $X_PY " test --stage 2 miri --target s390x-unknown-linux-gnu --test-args pass
28+ # Only run "pass" tests for the remaining targets, which is a bit faster. We have to use `miri`
29+ # instead of `src/tools/miri` here to avoid also running the cargo-miri tests.
30+ python3 " $X_PY " test --stage 2 miri --target x86_64-pc-windows-gnu -- tests/pass
31+ python3 " $X_PY " test --stage 2 miri --target i686-unknown-linux-gnu -- tests/pass
32+ python3 " $X_PY " test --stage 2 miri --target aarch64-unknown-linux-gnu -- tests/pass
33+ python3 " $X_PY " test --stage 2 miri --target s390x-unknown-linux-gnu -- tests/pass
3334 ;;
3435 x86_64-pc-windows-msvc)
3536 # Strangely, Linux targets do not work here. cargo always says
@@ -38,7 +39,7 @@ case $HOST_TARGET in
3839 # FIXME: Re-enable this once CI issues are fixed
3940 # See <https://github.com/rust-lang/rust/issues/127883>
4041 # For now, these tests are moved to `x86_64-msvc-ext2` in `src/ci/github-actions/jobs.yml`.
41- # python3 "$X_PY" test --stage 2 miri --target x86_64-apple-darwin --test-args pass
42+ # python3 "$X_PY" test --stage 2 miri --target x86_64-apple-darwin -- pass
4243 ;;
4344 * )
4445 echo " FATAL: unexpected host $HOST_TARGET "
5051
5152# FIXME: Re-enable this for msvc once CI issues are fixed
5253if [ " $HOST_TARGET " != " x86_64-pc-windows-msvc" ]; then
53- python3 " $X_PY " miri --stage 2 library/core --test-args notest
54- python3 " $X_PY " miri --stage 2 library/alloc --test-args notest
55- python3 " $X_PY " miri --stage 2 library/std --test-args notest
54+ python3 " $X_PY " miri --stage 2 library/core -- notest
55+ python3 " $X_PY " miri --stage 2 library/alloc -- notest
56+ python3 " $X_PY " miri --stage 2 library/std -- notest
5657fi
0 commit comments