Returning non-zero exit value if releng/run_all_auto fails. Proposal by Alexandre Ghiti.

This commit is contained in:
Thomas Schmitt 2022-07-02 09:03:43 +02:00
parent 0e8227e76a
commit 4ff9f8eedf

View File

@ -229,16 +229,22 @@ fi
# lines, perl regex, leading tabs
grep -n -E "${LIST_KWD}" "${CLOG}"
RET_GREP="$?"
ok=0
case ${RET_GREP} in
0) # found
;;
1) # not found
echo "${SELF}: Log file looks clear." # | tee -a ${CLOG}
ok=1
;;
*) #
echo "${SELF}: grep returned EXIT CODE: ${RET_GREP}." # | tee -a ${CLOG}
;;
esac
if test "$ok" = 0 && test "$exit_value" = 0
then
exit_value=1
fi
set -e
fi
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" | tee -a ${CLOG}
@ -259,5 +265,13 @@ fi
ls -lth "${GEN_DATA_DIR}" # | tee -a ${CLOG}
# Fin
if test "$exit_value" = 0
then
echo "${SELF}: +++ Test run and its log look like success."
else
echo
echo "${SELF}: --- Test run detected some failures."
echo
fi
exit $exit_value