@@ -68,13 +68,13 @@ scan_for_failures() {
6868 scan_files+=(" ${file_path} " )
6969 done < <(
7070 find verif/sim -type f \
71- \( -name " *.log" -o -name " *.iss " -o -name " *. txt" -o -name " iss_regr.log" \) \
71+ \( -name " *.log" -o -name " *.txt" -o -name " iss_regr.log" \) \
7272 -print0 2> /dev/null || true
7373 )
7474
7575 matches=" $(
7676 grep -HnE \
77- " \\ [FAILED\\ ]|\\ * \\ * \\ *[[:space:]]+FAILED[[:space:]]+ \\ * \\ * \\ *| SIMULATION FAILED|(^|[^0-9])[1-9][0-9]* FAILED|ERROR return code:|bad syscall|unrecognized opcode|extension .* required|make(\\ [[0-9]+\\ ])?: \\ *\\ *\\ *.*Error|terminate called|Traceback \\ (most recent call last\\ )" \
77+ " \\ [FAILED\\ ]|SIMULATION FAILED|(^|[^0-9])[1-9][0-9]* FAILED|ERROR return code:|bad syscall|unrecognized opcode|extension .* required|make(\\ [[0-9]+\\ ])?: \\ *\\ *\\ *.*Error|terminate called|Traceback \\ (most recent call last\\ )" \
7878 " ${scan_files[@]} " 2> /dev/null || true
7979 ) "
8080
@@ -87,6 +87,37 @@ scan_for_failures() {
8787 return 0
8888}
8989
90+ scan_iss_traces () {
91+ local matches=" "
92+ local critical_patterns
93+ critical_patterns=" ERROR return code:|bad syscall|unrecognized opcode|extension .* required|terminate called|Traceback \\ (most recent call last\\ )"
94+
95+ while IFS= read -r -d ' ' file_path; do
96+ local critical_matches
97+ local last_status
98+
99+ critical_matches=" $( grep -HnE " ${critical_patterns} " " ${file_path} " 2> /dev/null || true) "
100+ if [ -n " ${critical_matches} " ]; then
101+ matches+=" ${critical_matches} " $' \n '
102+ fi
103+
104+ last_status=" $(
105+ grep -nE " \\ *\\ *\\ *[[:space:]]+(FAILED|SUCCESS)[[:space:]]+\\ *\\ *\\ *|SIMULATION FAILED" " ${file_path} " 2> /dev/null | tail -n 1 || true
106+ ) "
107+ if [[ -n " ${last_status} " && " ${last_status} " != * " SUCCESS" * ]]; then
108+ matches+=" ${file_path} :${last_status} " $' \n '
109+ fi
110+ done < <( find verif/sim -type f -name " *.iss" -print0 2> /dev/null || true)
111+
112+ if [ -n " ${matches} " ]; then
113+ append_failure " ERROR: ${TIER_NAME} job reported success, but ISS trace failure patterns were found."
114+ printf " %s" " ${matches} " | tee -a " ${FAILURE_SUMMARY} " >&2
115+ return 1
116+ fi
117+
118+ return 0
119+ }
120+
90121rc=0
91122
92123log_info " Running ${TIER_NAME} : ${TIER_CONFIG} / ${TIER_TESTCASE} (${TIER_MODE} )"
@@ -160,5 +191,9 @@ if [ "${rc}" -eq 0 ] && ! scan_for_failures; then
160191 rc=1
161192fi
162193
194+ if [ " ${rc} " -eq 0 ] && ! scan_iss_traces; then
195+ rc=1
196+ fi
197+
163198echo " ${rc} " > " ${EXIT_CODE_FILE} "
164199exit " ${rc} "
0 commit comments