Skip to content

Commit 0658bd3

Browse files
sbryngelsonclaude
andcommitted
Preserve exit code for catastrophic test failures
Don't mask non-zero exit codes when tests crash before writing failed_uuids.txt. Only suppress the exit code when the file exists (meaning the test framework ran to completion and we can retry). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2efc61e commit 0658bd3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ jobs:
135135

136136
- name: Test
137137
run: |
138-
/bin/bash mfc.sh test -v --max-attempts 3 -j $(nproc) $TEST_ALL $TEST_PCT || true
138+
TEST_EXIT=0
139+
/bin/bash mfc.sh test -v --max-attempts 3 -j $(nproc) $TEST_ALL $TEST_PCT || TEST_EXIT=$?
139140
140141
# Retry only if a small number of tests failed (sporadic failures)
141142
if [ -f tests/failed_uuids.txt ]; then
@@ -150,6 +151,8 @@ jobs:
150151
echo "Too many failures ($NUM_FAILED) to retry — likely a real issue."
151152
exit 1
152153
fi
154+
elif [ "$TEST_EXIT" -ne 0 ]; then
155+
exit $TEST_EXIT
153156
fi
154157
env:
155158
TEST_ALL: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }}

0 commit comments

Comments
 (0)