Print fail messages before callbacks in test suite
Reorder operations in _endlog so failure messages get printed prior to performing callbacks and cleanup. This helps clarify why a test failed and places the message closer to the point of incident in the resulting logs. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes #6281
This commit is contained in:
parent
aa6e82a6a5
commit
b81a1c61ec
|
@ -418,7 +418,11 @@ function _endlog
|
|||
typeset logfile="/tmp/log.$$"
|
||||
_recursive_output $logfile
|
||||
|
||||
if [[ $1 == $STF_FAIL ]] ; then
|
||||
typeset exitcode=$1
|
||||
shift
|
||||
(( ${#@} > 0 )) && _printline "$@"
|
||||
|
||||
if [[ $exitcode == $STF_FAIL ]] ; then
|
||||
_execute_testfail_callbacks
|
||||
fi
|
||||
|
||||
|
@ -428,9 +432,7 @@ function _endlog
|
|||
log_note "Performing local cleanup via log_onexit ($cleanup)"
|
||||
$cleanup
|
||||
fi
|
||||
typeset exitcode=$1
|
||||
shift
|
||||
(( ${#@} > 0 )) && _printline "$@"
|
||||
|
||||
exit $exitcode
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue