@@ -34,10 +34,10 @@ echo "Installing release version of Miri"
34
34
time ./miri install
35
35
36
36
# Prepare debug build for direct `./miri` invocations.
37
- # We enable all features to make sure the Stacked Borrows consistency check runs.
37
+ # We enable all features (except tracing) to make sure the Stacked Borrows consistency check runs.
38
38
echo " 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
39
+ FEATURES= " --feature=genmc,stack-cache,stack-cache-consistency-check "
40
+ time ./miri build " $FEATURES " # the build that all the `./miri test` below will use
41
41
42
42
endgroup
43
43
@@ -61,9 +61,9 @@ function run_tests {
61
61
62
62
# # ui test suite
63
63
if [ -n " ${GC_STRESS-} " ]; then
64
- time MIRIFLAGS=" ${MIRIFLAGS-} -Zmiri-provenance-gc=1" ./miri test $TARGET_FLAG
64
+ time MIRIFLAGS=" ${MIRIFLAGS-} -Zmiri-provenance-gc=1" ./miri test " $FEATURES " $TARGET_FLAG
65
65
else
66
- time ./miri test $TARGET_FLAG
66
+ time ./miri test " $FEATURES " $TARGET_FLAG
67
67
fi
68
68
69
69
# # advanced tests
@@ -74,20 +74,20 @@ function run_tests {
74
74
# them. Also error locations change so we don't run the failing tests.
75
75
# We explicitly enable debug-assertions here, they are disabled by -O but we have tests
76
76
# 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}
77
+ time MIRIFLAGS=" ${MIRIFLAGS-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test " $FEATURES " $TARGET_FLAG tests/{pass,panic}
78
78
fi
79
79
if [ -n " ${MANY_SEEDS-} " ]; then
80
80
# Run many-seeds tests. (Also tests `./miri run`.)
81
81
time for FILE in tests/many-seeds/* .rs; do
82
- ./miri run " -Zmiri-many-seeds=0..$MANY_SEEDS " $TARGET_FLAG " $FILE "
82
+ ./miri run " $FEATURES " $TARGET_FLAG " -Zmiri-many-seeds=0..$MANY_SEEDS " " $FILE "
83
83
done
84
84
fi
85
85
if [ -n " ${TEST_BENCH-} " ]; then
86
86
# Check that the benchmarks build and run, but only once.
87
- time HYPERFINE=" hyperfine -w0 -r1 --show-output" ./miri bench $TARGET_FLAG --no-install
87
+ time HYPERFINE=" hyperfine -w0 -r1 --show-output" ./miri bench " $FEATURES " $TARGET_FLAG --no-install
88
88
fi
89
89
# Smoke-test `./miri run --dep`.
90
- ./miri run $TARGET_FLAG --dep tests/pass-dep/getrandom.rs
90
+ ./miri run " $FEATURES " $TARGET_FLAG --dep tests/pass-dep/getrandom.rs
91
91
92
92
# # test-cargo-miri
93
93
# On Windows, there is always "python", not "python3" or "python2".
@@ -125,7 +125,7 @@ function run_tests_minimal {
125
125
exit 1
126
126
fi
127
127
128
- time ./miri test $TARGET_FLAG " $@ "
128
+ time ./miri test " $FEATURES " $TARGET_FLAG " $@ "
129
129
130
130
# Ensure that a small smoke test of cargo-miri works.
131
131
time cargo miri run --manifest-path test-cargo-miri/no-std-smoke/Cargo.toml $TARGET_FLAG
0 commit comments