diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-07-23 11:49:14 +0100 |
---|---|---|
committer | Martin Peres <martin.peres@linux.intel.com> | 2015-07-27 16:31:40 +0300 |
commit | 8b81a527fbde59e19f34b52c81a1bc15a0999a56 (patch) | |
tree | dd7a8a53b8701ead15de8ccd6300cc09b3dac830 /ezbench.sh | |
parent | 51d0f6f4086db1793f4217bf01513c66f052be57 (diff) |
Detect test run failure and highlight it
If the run fails to return any values or reported an error, keep the
error logs and highlight the failure in the console.
Diffstat (limited to 'ezbench.sh')
-rwxr-xr-x | ezbench.sh | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -235,6 +235,7 @@ startTime=`date +%s` callIfDefined ezbench_pre_hook # ANSI colors +c_red='\e[31m' c_bright_red='\e[1;31m' c_bright_green='\e[1;32m' c_bright_yellow='\e[1;33m' @@ -307,10 +308,16 @@ do postHookFuncName=${testNames[$t]}_run_post_hook processHookFuncName=${testNames[$t]}_process + unset ERROR callIfDefined $preHookFuncName - output=$($runFuncName $rounds $fps_logs 2>$error_logs) + output=$($runFuncName $rounds $fps_logs 2>$error_logs || ERROR=1) callIfDefined $postHookFuncName + if [ -n "$ERROR" -o -z "$output" ]; then + echo -e "${c_red}failed${c_reset}" + continue + fi + # delete the error file if it is empty if [ ! -s $error_logs ] ; then rm $error_logs |