@@ -28,17 +28,16 @@ begingroup "Building Miri"
28
28
export RUSTFLAGS=" -D warnings"
29
29
export CARGO_INCREMENTAL=0
30
30
export 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"
33
31
34
32
# 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.
36
33
echo " Installing release version of Miri"
37
34
time ./miri install
38
35
39
36
# Prepare debug build for direct `./miri` invocations.
37
+ # We enable all features to make sure the Stacked Borrows consistency check runs.
40
38
echo " 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
42
41
43
42
endgroup
44
43
@@ -62,9 +61,9 @@ function run_tests {
62
61
63
62
# # ui test suite
64
63
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
66
65
else
67
- time ./miri test " $FEATURES " $TARGET_FLAG
66
+ time ./miri test $TARGET_FLAG
68
67
fi
69
68
70
69
# # advanced tests
@@ -75,20 +74,20 @@ function run_tests {
75
74
# them. Also error locations change so we don't run the failing tests.
76
75
# We explicitly enable debug-assertions here, they are disabled by -O but we have tests
77
76
# 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}
79
78
fi
80
79
if [ -n " ${MANY_SEEDS-} " ]; then
81
80
# Run many-seeds tests. (Also tests `./miri run`.)
82
81
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 "
84
83
done
85
84
fi
86
85
if [ -n " ${TEST_BENCH-} " ]; then
87
86
# Check that the benchmarks build and run, but only once.
88
87
time HYPERFINE=" hyperfine -w0 -r1 --show-output" ./miri bench $TARGET_FLAG --no-install
89
88
fi
90
89
# 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
92
91
93
92
# # test-cargo-miri
94
93
# On Windows, there is always "python", not "python3" or "python2".
@@ -126,7 +125,7 @@ function run_tests_minimal {
126
125
exit 1
127
126
fi
128
127
129
- time ./miri test " $FEATURES " $TARGET_FLAG " $@ "
128
+ time ./miri test $TARGET_FLAG " $@ "
130
129
131
130
# Ensure that a small smoke test of cargo-miri works.
132
131
time cargo miri run --manifest-path test-cargo-miri/no-std-smoke/Cargo.toml $TARGET_FLAG
0 commit comments