+ if ! ./${tfile%.c} >/tmp/PID$$.log 2>&1
+ then
+ echo "[FAIL] unit test failed for: $tfile"
+ if [[ -n $capture_file ]]
+ then
+ echo "all errors captured in $capture_file, listing only fail message on tty"
+ echo "$tfile --------------------------------------" >>$capture_file
+ cat /tmp/PID$$.log >>$capture_file
+ grep "^<FAIL>" /tmp/PID$$.log
+ echo ""
+ else
+ if (( quiet ))
+ then
+ grep "^<" /tmp/PID$$.log|egrep -v "^<SIEM>|^<EM>" # in quiet mode just dump <...> messages which are assumed from the test programme not appl
+ else
+ cat /tmp/PID$$.log
+ fi
+ fi
+ (( ut_errors++ )) # cause failure even if not in strict mode
+ if (( ! always_gcov ))
+ then
+ exit 1 # we are in a subshell, must exit bad
+ fi
+ else
+ if (( show_output ))
+ then
+ printf "\n============= test programme output =======================\n"
+ cat /tmp/PID$$.log
+ printf "===========================================================\n"
+ else
+ grep "SUMMARY" /tmp/PID$$.log
+ fi
+ fi