Improve the test framework

The executeOk() function should dump stderr to the log in event of
failure, but execute() need not.
This commit is contained in:
Andrew Bettison 2018-03-26 18:31:22 +10:30
parent bc7f7aeaaf
commit f8850535ad

View File

@ -1760,7 +1760,6 @@ tfw_quietly() {
execute() {
$_tfw_assert_noise && tfw_log "# execute" $(shellarg "$@")
_tfw_getopts execute "$@"
_tfw_dump_on_fail --stderr
shift $_tfw_getopts_shift
_tfw_execute "$@"
}
@ -1769,6 +1768,7 @@ executeOk() {
$_tfw_assert_noise && tfw_log "# executeOk" $(shellarg "$@")
_tfw_getopts executeok "$@"
_tfw_opt_exit_status=0
_tfw_dump_on_fail --stderr
shift $_tfw_getopts_shift
_tfw_execute "$@"
}