potiuk commented on code in PR #74280:
URL: https://github.com/apache/airflow/pull/74280#discussion_r4432407002
##########
scripts/in_container/run_ci_tests.sh:
##########
@@ -23,13 +23,21 @@ echo "Starting the tests with those pytest arguments:"
"${@}"
echo
set +e
+# Breeze passes the JUnit XML path only as a pytest argument.
+RESULT_LOG_FILE=""
+for arg in "${@}"; do
+ if [[ ${arg} == --junitxml=* ]]; then
+ RESULT_LOG_FILE="${arg#--junitxml=}"
+ fi
+done
+
pytest "${@}"
RES=$?
if [[ ${RES} == "139" ]]; then
echo "${COLOR_YELLOW}Sometimes Pytest fails at exiting with segfault, but
all tests actually passed${COLOR_RESET}"
echo "${COLOR_YELLOW}We should ignore such case. Checking if junitxml file
${RESULT_LOG_FILE} is there with 0 errors and failures${COLOR_RESET}"
- if [[ -f ${RESULT_LOG_FILE} ]]; then
+ if [[ -n ${RESULT_LOG_FILE} && -f ${RESULT_LOG_FILE} ]]; then
Review Comment:
Good catch - done in e64c80941f: run_ci_tests.sh now removes any existing
report at the --junitxml path before pytest starts, so the segfault fallback
can only read a report from the current run.
---
Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]