@@ -30,14 +30,15 @@ export CARGO_INCREMENTAL=0
3030export CARGO_EXTRA_FLAGS=" --locked"
3131
3232# Determine configuration for installed build (used by test-cargo-miri and `./miri bench`).
33+ # We use the default set of features for this.
3334echo " Installing release version of Miri"
3435time ./miri install
3536
3637# Prepare debug build for direct `./miri` invocations.
37- # We enable all features to make sure the Stacked Borrows consistency check runs .
38+ # Here we enable some more features and checks .
3839echo " Building debug version of Miri"
39- export CARGO_EXTRA_FLAGS= " $CARGO_EXTRA_FLAGS --all- features"
40- time ./miri build # the build that all the `./miri test` below will use
40+ export FEATURES= " -- features=expensive-consistency-checks,genmc "
41+ time ./miri build $FEATURES # the build that all the `./miri test` below will use
4142
4243endgroup
4344
@@ -63,7 +64,7 @@ function run_tests {
6364 if [ -n " ${GC_STRESS-} " ]; then
6465 time MIRIFLAGS=" ${MIRIFLAGS-} -Zmiri-provenance-gc=1" ./miri test $TARGET_FLAG
6566 else
66- time ./miri test $TARGET_FLAG
67+ time ./miri test $FEATURES $ TARGET_FLAG
6768 fi
6869
6970 # # advanced tests
@@ -74,20 +75,20 @@ function run_tests {
7475 # them. Also error locations change so we don't run the failing tests.
7576 # We explicitly enable debug-assertions here, they are disabled by -O but we have tests
7677 # which exist to check that we panic on debug assertion failures.
77- time MIRIFLAGS=" ${MIRIFLAGS-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test $TARGET_FLAG tests/{pass,panic}
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}
7879 fi
7980 if [ -n " ${MANY_SEEDS-} " ]; then
8081 # Run many-seeds tests. (Also tests `./miri run`.)
8182 time for FILE in tests/many-seeds/* .rs; do
82- ./miri run " -Zmiri-many-seeds=0..$MANY_SEEDS " $TARGET_FLAG " $FILE "
83+ ./miri run $FEATURES " -Zmiri-many-seeds=0..$MANY_SEEDS " $TARGET_FLAG " $FILE "
8384 done
85+ # Smoke-test `./miri run --dep`.
86+ ./miri run $FEATURES $TARGET_FLAG --dep tests/pass-dep/getrandom.rs
8487 fi
8588 if [ -n " ${TEST_BENCH-} " ]; then
8689 # Check that the benchmarks build and run, but only once.
8790 time HYPERFINE=" hyperfine -w0 -r1 --show-output" ./miri bench $TARGET_FLAG --no-install
8891 fi
89- # Smoke-test `./miri run --dep`.
90- ./miri run $TARGET_FLAG --dep tests/pass-dep/getrandom.rs
9192
9293 # # test-cargo-miri
9394 # On Windows, there is always "python", not "python3" or "python2".
0 commit comments