Skip to content

Commit 2626840

Browse files
authored
Merge pull request #820 from trz42/check_for_fatal_messages
catch FATAL: messages when checking build result
2 parents 161a284 + 9812aa5 commit 2626840

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

bot/check-build.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# - SUCCESS (all of)
1818
# - working directory contains slurm-JOBID.out file
1919
# - working directory contains eessi*tar.gz
20+
# - no message FATAL
2021
# - no message ERROR
2122
# - no message FAILED
2223
# - no message ' required modules missing:'
@@ -25,6 +26,7 @@
2526
# - FAILED (one of ... implemented as NOT SUCCESS)
2627
# - no slurm-JOBID.out file
2728
# - no tarball
29+
# - message with FATAL
2830
# - message with ERROR
2931
# - message with FAILED
3032
# - message with ' required modules missing:'
@@ -105,6 +107,16 @@ else
105107
[[ ${VERBOSE} -ne 0 ]] && echo " Slurm output file '"${job_out}"' NOT found"
106108
fi
107109

110+
FATAL=-1
111+
if [[ ${SLURM_OUTPUT_FOUND} -eq 1 ]]; then
112+
GP_fatal='FATAL: '
113+
grep_out=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep "${GP_fatal}")
114+
[[ $? -eq 0 ]] && FATAL=1 || FATAL=0
115+
# have to be careful to not add searched for pattern into slurm out file
116+
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_fatal}"'"
117+
[[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}"
118+
fi
119+
108120
ERROR=-1
109121
if [[ ${SLURM_OUTPUT_FOUND} -eq 1 ]]; then
110122
GP_error='ERROR: '
@@ -163,6 +175,7 @@ fi
163175

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

191204
# Default reason:
192205
if [[ ${SLURM_OUTPUT_FOUND} -eq 1 ]] && \
206+
[[ ${FATAL} -eq 0 ]] && \
193207
[[ ${ERROR} -eq 0 ]] && \
194208
[[ ${FAILED} -eq 0 ]] && \
195209
[[ ${MISSING} -eq 0 ]] && \
@@ -223,6 +237,7 @@ fi
223237
# <dt>_Details_</dt>
224238
# <dd>
225239
# :white_check_mark: job output file <code>slurm-4682.out</code><br/>
240+
# :white_check_mark: no message matching <code>FATAL: </code><br/>
226241
# :white_check_mark: no message matching <code>ERROR: </code><br/>
227242
# :white_check_mark: no message matching <code>FAILED: </code><br/>
228243
# :white_check_mark: no message matching <code> required modules missing:</code><br/>
@@ -264,6 +279,7 @@ fi
264279
# <dt>_Details_</dt>
265280
# <dd>
266281
# :white_check_mark: job output file <code>slurm-4682.out</code><br/>
282+
# :x: no message matching <code>FATAL: </code><br/>
267283
# :x: no message matching <code>ERROR: </code><br/>
268284
# :white_check_mark: no message matching <code>FAILED: </code><br/>
269285
# :x: no message matching <code> required modules missing:</code><br/>
@@ -381,6 +397,10 @@ success_msg="job output file <code>${job_out}</code>"
381397
failure_msg="no job output file <code>${job_out}</code>"
382398
comment_details_list=${comment_details_list}$(add_detail ${SLURM_OUTPUT_FOUND} 1 "${success_msg}" "${failure_msg}")
383399

400+
success_msg="no message matching <code>${GP_fatal}</code>"
401+
failure_msg="found message matching <code>${GP_fatal}</code>"
402+
comment_details_list=${comment_details_list}$(add_detail ${FATAL} 0 "${success_msg}" "${failure_msg}")
403+
384404
success_msg="no message matching <code>${GP_error}</code>"
385405
failure_msg="found message matching <code>${GP_error}</code>"
386406
comment_details_list=${comment_details_list}$(add_detail ${ERROR} 0 "${success_msg}" "${failure_msg}")

0 commit comments

Comments
 (0)