diff --git a/.gitignore b/.gitignore index e3fd4d27a2..cafcb23865 100644 --- a/.gitignore +++ b/.gitignore @@ -68,6 +68,7 @@ build-fprime-automatic* /RPI/bin /ci-venv/ /ci-logs* +/ci-Framework-logs* TesterBase.* GTestBase.* **/DefaultDict/serializable/* diff --git a/ci/helpers.bash b/ci/helpers.bash index d4624a0e49..7079795e0d 100755 --- a/ci/helpers.bash +++ b/ci/helpers.bash @@ -31,13 +31,31 @@ function fail_and_stop() echo -e "${RED}---------------- ERROR ----------------" 1>&2 echo "${1}" 1>&2 echo -e "---------------------------------------${NOCOLOR}" 1>&2 - LASTLOG=$(ls -td $(find "${LOG_DIR}" -name "*err.log" -type f) | head -1) - if [ -f "${LASTLOG}" ] + + # Look for an stderr log which is not empty + LASTLOG_ERR=$(ls -td $(find "${LOG_DIR}" -name "*err.log" -type f) | head -1) + + if [ -f "${LASTLOG_ERR}" ] then - - echo -e "---------------- STDERR ---------------" 1>&2 - tail -30 "${LASTLOG}" 1>&2 - echo -e "---------------------------------------" 1>&2 + # Check if a related stdout log exist + LASTLOG_OUT="${LASTLOG_ERR::-7}out.log" + + if [ -f "${LASTLOG_OUT}" ] + then + # Display stdout log + echo -e "${RED}---------------- STDOUT ---------------${NOCOLOR}" 1>&2 + cat "${LASTLOG_OUT}" 1>&2 + echo -e "${RED}---------------------------------------${NOCOLOR}" 1>&2 + fi + + # Display stderr log + echo -e "${RED}---------------- STDERR ---------------${NOCOLOR}" 1>&2 + cat "${LASTLOG_ERR}" 1>&2 + echo -e "${RED}---------------------------------------${NOCOLOR}" 1>&2 + + echo -e "${RED}---------------- END ERROR ------------" 1>&2 + echo "${1}" 1>&2 + echo -e "---------------------------------------${NOCOLOR}" 1>&2 fi archive_logs exit 1