Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch FATAL: messages when checking build result #820

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions bot/check-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# - SUCCESS (all of)
# - working directory contains slurm-JOBID.out file
# - working directory contains eessi*tar.gz
# - no message FATAL
# - no message ERROR
# - no message FAILED
# - no message ' required modules missing:'
Expand All @@ -25,6 +26,7 @@
# - FAILED (one of ... implemented as NOT SUCCESS)
# - no slurm-JOBID.out file
# - no tarball
# - message with FATAL
# - message with ERROR
# - message with FAILED
# - message with ' required modules missing:'
Expand Down Expand Up @@ -105,6 +107,16 @@ else
[[ ${VERBOSE} -ne 0 ]] && echo " Slurm output file '"${job_out}"' NOT found"
fi

FATAL=-1
if [[ ${SLURM_OUTPUT_FOUND} -eq 1 ]]; then
GP_fatal='FATAL: '
grep_out=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep "${GP_fatal}")
[[ $? -eq 0 ]] && FATAL=1 || FATAL=0
# have to be careful to not add searched for pattern into slurm out file
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_fatal}"'"
[[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}"
fi

ERROR=-1
if [[ ${SLURM_OUTPUT_FOUND} -eq 1 ]]; then
GP_error='ERROR: '
Expand Down Expand Up @@ -163,6 +175,7 @@ fi

[[ ${VERBOSE} -ne 0 ]] && echo "SUMMARY: ${job_dir}/${job_out}"
[[ ${VERBOSE} -ne 0 ]] && echo " <test name>: <actual result> (<expected result>)"
[[ ${VERBOSE} -ne 0 ]] && echo " FATAL......: $([[ $FATAL -eq 1 ]] && echo 'yes' || echo 'no') (no)"
[[ ${VERBOSE} -ne 0 ]] && echo " ERROR......: $([[ $ERROR -eq 1 ]] && echo 'yes' || echo 'no') (no)"
[[ ${VERBOSE} -ne 0 ]] && echo " FAILED.....: $([[ $FAILED -eq 1 ]] && echo 'yes' || echo 'no') (no)"
[[ ${VERBOSE} -ne 0 ]] && echo " REQ_MISSING: $([[ $MISSING -eq 1 ]] && echo 'yes' || echo 'no') (no)"
Expand Down Expand Up @@ -190,6 +203,7 @@ job_result_file=_bot_job${SLURM_JOB_ID}.result

# Default reason:
if [[ ${SLURM_OUTPUT_FOUND} -eq 1 ]] && \
[[ ${FATAL} -eq 0 ]] && \
[[ ${ERROR} -eq 0 ]] && \
[[ ${FAILED} -eq 0 ]] && \
[[ ${MISSING} -eq 0 ]] && \
Expand Down Expand Up @@ -223,6 +237,7 @@ fi
# <dt>_Details_</dt>
# <dd>
# :white_check_mark: job output file <code>slurm-4682.out</code><br/>
# :white_check_mark: no message matching <code>FATAL: </code><br/>
# :white_check_mark: no message matching <code>ERROR: </code><br/>
# :white_check_mark: no message matching <code>FAILED: </code><br/>
# :white_check_mark: no message matching <code> required modules missing:</code><br/>
Expand Down Expand Up @@ -264,6 +279,7 @@ fi
# <dt>_Details_</dt>
# <dd>
# :white_check_mark: job output file <code>slurm-4682.out</code><br/>
# :x: no message matching <code>FATAL: </code><br/>
# :x: no message matching <code>ERROR: </code><br/>
# :white_check_mark: no message matching <code>FAILED: </code><br/>
# :x: no message matching <code> required modules missing:</code><br/>
Expand Down Expand Up @@ -381,6 +397,10 @@ success_msg="job output file <code>${job_out}</code>"
failure_msg="no job output file <code>${job_out}</code>"
comment_details_list=${comment_details_list}$(add_detail ${SLURM_OUTPUT_FOUND} 1 "${success_msg}" "${failure_msg}")

success_msg="no message matching <code>${GP_fatal}</code>"
failure_msg="found message matching <code>${GP_fatal}</code>"
comment_details_list=${comment_details_list}$(add_detail ${FATAL} 0 "${success_msg}" "${failure_msg}")

success_msg="no message matching <code>${GP_error}</code>"
failure_msg="found message matching <code>${GP_error}</code>"
comment_details_list=${comment_details_list}$(add_detail ${ERROR} 0 "${success_msg}" "${failure_msg}")
Expand Down