@@ -17,11 +17,11 @@ begingroup "Building Miri"
1717echo " Installing release version of Miri"
1818export RUSTFLAGS=" -D warnings"
1919export CARGO_INCREMENTAL=0
20- ./miri install # implicitly locked
20+ export CARGO_EXTRA_FLAGS=" --locked"
21+ ./miri install
2122
2223# Prepare debug build for direct `./miri` invocations
2324echo " Building debug version of Miri"
24- export CARGO_EXTRA_FLAGS=" --locked"
2525./miri check --no-default-features # make sure this can be built
2626./miri check --all-features # and this, too
2727./miri build --all-targets # the build that all the `./miri test` below will use
@@ -39,8 +39,11 @@ function run_tests {
3939 # # ui test suite
4040 ./miri test
4141 if [ -z " ${MIRI_TEST_TARGET+exists} " ]; then
42- # Only for host architecture: tests with optimizations (`-O` is what cargo passes, but crank MIR
43- # optimizations up all the way, too).
42+ # Host-only tests: running these on all targets is unlikely to catch more problems and would
43+ # cost a lot of CI time.
44+
45+ # Tests with optimizations (`-O` is what cargo passes, but crank MIR optimizations up all the
46+ # way, too).
4447 # Optimizations change diagnostics (mostly backtraces), so we don't check
4548 # them. Also error locations change so we don't run the failing tests.
4649 # We explicitly enable debug-assertions here, they are disabled by -O but we have tests
@@ -51,6 +54,9 @@ function run_tests {
5154 for FILE in tests/many-seeds/* .rs; do
5255 MIRI_SEEDS=64 CARGO_EXTRA_FLAGS=" $CARGO_EXTRA_FLAGS -q" ./miri many-seeds ./miri run " $FILE "
5356 done
57+
58+ # Check that the benchmarks build and run, but without actually benchmarking.
59+ HYPERFINE=" bash -c" ./miri bench
5460 fi
5561
5662 # # test-cargo-miri
@@ -75,13 +81,6 @@ function run_tests {
7581 unset RUSTC MIRI
7682 rm -rf .cargo
7783
78- # Ensure that our benchmarks all work, but only on Linux hosts.
79- if [ -z " ${MIRI_TEST_TARGET+exists} " ] && [ " $HOST_TARGET " = x86_64-unknown-linux-gnu ] ; then
80- for BENCH in $( ls " bench-cargo-miri" ) ; do
81- cargo miri run --manifest-path bench-cargo-miri/$BENCH /Cargo.toml
82- done
83- fi
84-
8584 endgroup
8685}
8786
0 commit comments