Skip to content

Commit 3f1a86c

Browse files
committed
Errexit hacking
1 parent 0791a8f commit 3f1a86c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.evergreen/run-tests.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,12 @@ if [ -z "$GREEN_FRAMEWORK" ]; then
278278
else
279279
ASYNC_PYTEST_ARGS=("-m asyncio" "--junitxml=xunit-results/TEST-asyncresults.xml" "${PYTEST_ARGS[@]}")
280280
fi
281+
# Workaround until unittest -> pytest conversion is complete
282+
set +o errexit
281283
# shellcheck disable=SC2048
282284
uv run ${UV_ARGS[*]} pytest "${PYTEST_ARGS[@]}"
285+
exit_code=$?
283286

284-
# Workaround until unittest -> pytest conversion is complete
285-
set +o errexit
286287
# shellcheck disable=SC2048
287288
uv run ${UV_ARGS[*]} pytest "${ASYNC_PYTEST_ARGS[@]}" "--collect-only"
288289
collected=$?
@@ -292,6 +293,9 @@ if [ -z "$GREEN_FRAMEWORK" ]; then
292293
# shellcheck disable=SC2048
293294
uv run ${UV_ARGS[*]} pytest "${ASYNC_PYTEST_ARGS[@]}"
294295
fi
296+
if [ $exit_code -ne 0 ]; then
297+
exit $exit_code
298+
fi
295299
else
296300
# shellcheck disable=SC2048
297301
uv run ${UV_ARGS[*]} green_framework_test.py $GREEN_FRAMEWORK -v "${TEST_ARGS[@]}"

0 commit comments

Comments
 (0)