@@ -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".
@@ -149,10 +150,11 @@ case $HOST_TARGET in
149150 i686-unknown-linux-gnu)
150151 # Host
151152 MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
153+ # Fully, but not officially, supported tier 2
154+ MANY_SEEDS=16 TEST_TARGET=aarch64-linux-android run_tests
152155 # Partially supported targets (tier 2)
153156 BASIC=" empty_main integer heap_alloc libc-mem vec string btreemap" # ensures we have the basics: pre-main code, system allocator
154157 UNIX=" hello panic/panic panic/unwind concurrency/simple atomic libc-mem libc-misc libc-random env num_cpus" # the things that are very similar across all Unixes, and hence easily supported there
155- TEST_TARGET=aarch64-linux-android run_tests_minimal $BASIC $UNIX time hashmap random thread sync concurrency epoll eventfd prctl
156158 TEST_TARGET=wasm32-unknown-unknown run_tests_minimal no_std empty_main wasm # this target doesn't really have std
157159 TEST_TARGET=thumbv7em-none-eabihf run_tests_minimal no_std
158160 ;;
0 commit comments