@@ -28,17 +28,16 @@ begingroup "Building Miri"
2828export RUSTFLAGS=" -D warnings"
2929export CARGO_INCREMENTAL=0
3030export CARGO_EXTRA_FLAGS=" --locked"
31- # We enable all features (except tracing) to make sure the Stacked Borrows consistency check runs.
32- export FEATURES=" --features=genmc,stack-cache,stack-cache-consistency-check"
3331
3432# Determine configuration for installed build (used by test-cargo-miri and `./miri bench`).
35- # $FEATURES is not passed here as "stack-cache-consistency-check" makes things quite slow.
3633echo " Installing release version of Miri"
3734time ./miri install
3835
3936# Prepare debug build for direct `./miri` invocations.
37+ # We enable all features to make sure the Stacked Borrows consistency check runs.
4038echo " Building debug version of Miri"
41- time ./miri build " $FEATURES " # the build that all the `./miri test` below will use
39+ export CARGO_EXTRA_FLAGS=" $CARGO_EXTRA_FLAGS --all-features"
40+ time ./miri build # the build that all the `./miri test` below will use
4241
4342endgroup
4443
@@ -62,9 +61,9 @@ function run_tests {
6261
6362 # # ui test suite
6463 if [ -n " ${GC_STRESS-} " ]; then
65- time MIRIFLAGS=" ${MIRIFLAGS-} -Zmiri-provenance-gc=1" ./miri test " $FEATURES " $TARGET_FLAG
64+ time MIRIFLAGS=" ${MIRIFLAGS-} -Zmiri-provenance-gc=1" ./miri test $TARGET_FLAG
6665 else
67- time ./miri test " $FEATURES " $TARGET_FLAG
66+ time ./miri test $TARGET_FLAG
6867 fi
6968
7069 # # advanced tests
@@ -75,20 +74,20 @@ function run_tests {
7574 # them. Also error locations change so we don't run the failing tests.
7675 # We explicitly enable debug-assertions here, they are disabled by -O but we have tests
7776 # which exist to check that we panic on debug assertion failures.
78- time MIRIFLAGS=" ${MIRIFLAGS-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test " $FEATURES " $TARGET_FLAG tests/{pass,panic}
77+ time MIRIFLAGS=" ${MIRIFLAGS-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test $TARGET_FLAG tests/{pass,panic}
7978 fi
8079 if [ -n " ${MANY_SEEDS-} " ]; then
8180 # Run many-seeds tests. (Also tests `./miri run`.)
8281 time for FILE in tests/many-seeds/* .rs; do
83- ./miri run " $FEATURES " $TARGET_FLAG " -Zmiri-many-seeds=0..$MANY_SEEDS " " $FILE "
82+ ./miri run " -Zmiri-many-seeds=0..$MANY_SEEDS " $TARGET_FLAG " $FILE "
8483 done
8584 fi
8685 if [ -n " ${TEST_BENCH-} " ]; then
8786 # Check that the benchmarks build and run, but only once.
8887 time HYPERFINE=" hyperfine -w0 -r1 --show-output" ./miri bench $TARGET_FLAG --no-install
8988 fi
9089 # Smoke-test `./miri run --dep`.
91- ./miri run " $FEATURES " $TARGET_FLAG --dep tests/pass-dep/getrandom.rs
90+ ./miri run $TARGET_FLAG --dep tests/pass-dep/getrandom.rs
9291
9392 # # test-cargo-miri
9493 # On Windows, there is always "python", not "python3" or "python2".
@@ -126,7 +125,7 @@ function run_tests_minimal {
126125 exit 1
127126 fi
128127
129- time ./miri test " $FEATURES " $TARGET_FLAG " $@ "
128+ time ./miri test $TARGET_FLAG " $@ "
130129
131130 # Ensure that a small smoke test of cargo-miri works.
132131 time cargo miri run --manifest-path test-cargo-miri/no-std-smoke/Cargo.toml $TARGET_FLAG
0 commit comments