Mercurial > hg > octave-kai > gnulib-hg
changeset 14883:501bcef3a4fb
tests init: new function 'fatal_', for hard errors
Before this patch, the only way offered by tests/init.sh to
properly signal a hard error was the `framework_failure_'
function. But the error message issued by that function,
as its name would suggest, refers to a set-up failure in the
testsuite, while hard errors can obviously also be due to
other reasons. The best way to fix this inconsistency is to
introduce a new function with a more general error message.
* tests/init.sh (fatal_): New function.
author | Stefano Lattarini <stefano.lattarini@gmail.com> |
---|---|
date | Tue, 07 Jun 2011 13:27:00 +0200 |
parents | 6bda4d963605 |
children | e82c8fcf9b40 |
files | ChangeLog tests/init.sh |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-06-07 Stefano Lattarini <stefano.lattarini@gmail.com> + + tests init: new function 'fatal_', for hard errors + Before this patch, the only way offered by tests/init.sh to + properly signal a hard error was the `framework_failure_' + function. But the error message issued by that function, + as its name would suggest, refers to a set-up failure in the + testsuite, while hard errors can obviously also be due to + other reasons. The best way to fix this inconsistency is to + introduce a new function with a more general error message. + * tests/init.sh (fatal_): New function. + 2011-06-06 Eric Blake <eblake@redhat.com> canonicalize-lgpl: use common idiom
--- a/tests/init.sh +++ b/tests/init.sh @@ -77,6 +77,7 @@ warn_ () { echo "$@" 1>&$stderr_fileno_; } fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; } skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; } +fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; } framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; } # Sanitize this shell to POSIX mode, if possible.