Skip to content

Commit 2a89b74

Browse files
committed
run the provenance-gc=1 test on all targets, but only for some of the tests
before: only on Linux host, all tests after: only the test suite itself (not cargo-miri or the mir-opt-level=4 run), on all hosts for the host target and on Linux for all "full" targets.
1 parent b7912d3 commit 2a89b74

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

src/tools/miri/.github/workflows/ci.yml

-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v3
3737

38-
- name: Set the tag GC interval to 1 on linux
39-
if: runner.os == 'Linux'
40-
run: echo "MIRIFLAGS=-Zmiri-provenance-gc=1" >> $GITHUB_ENV
41-
4238
# Cache the global cargo directory, but NOT the local `target` directory which
4339
# we cannot reuse anyway when the nightly changes (and it grows quite large
4440
# over time).

src/tools/miri/ci.sh

+12-5
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,23 @@ endgroup
3030

3131
# Test
3232
function run_tests {
33-
if [ -n "${MIRI_TEST_TARGET+exists}" ]; then
33+
if [ -n "${MIRI_TEST_TARGET:-}" ]; then
3434
begingroup "Testing foreign architecture $MIRI_TEST_TARGET"
3535
else
3636
begingroup "Testing host architecture"
3737
fi
3838

3939
## ui test suite
40-
./miri test
41-
if [ -z "${MIRI_TEST_TARGET+exists}" ]; then
42-
# Host-only tests: running these on all targets is unlikely to catch more problems and would
40+
# On the host and on Linux, also stress-test the GC.
41+
if [ -z "${MIRI_TEST_TARGET:-}" ] || [ "$HOST_TARGET" = x86_64-unknown-linux-gnu ]; then
42+
MIRIFLAGS="${MIRIFLAGS:-} -Zmiri-provenance-gc=1" ./miri test
43+
else
44+
./miri test
45+
fi
46+
47+
# Host-only tests
48+
if [ -z "${MIRI_TEST_TARGET:-}" ]; then
49+
# Running these on all targets is unlikely to catch more problems and would
4350
# cost a lot of CI time.
4451

4552
# Tests with optimizations (`-O` is what cargo passes, but crank MIR optimizations up all the
@@ -85,7 +92,7 @@ function run_tests {
8592
}
8693

8794
function run_tests_minimal {
88-
if [ -n "${MIRI_TEST_TARGET+exists}" ]; then
95+
if [ -n "${MIRI_TEST_TARGET:-}" ]; then
8996
begingroup "Testing MINIMAL foreign architecture $MIRI_TEST_TARGET: only testing $@"
9097
else
9198
begingroup "Testing MINIMAL host architecture: only testing $@"

0 commit comments

Comments
 (0)