X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Finit.sh;h=0da6c1e328a9e705add03847b592458eee62c4b0;hb=17f0ec6;hp=71c6516962a9da5ff159ea7fbd3f51261f6b94e3;hpb=76187a084bf2379a1577bf306b6742a447271a3c;p=gnulib.git diff --git a/tests/init.sh b/tests/init.sh index 71c651696..0da6c1e32 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -68,8 +68,8 @@ Exit () { set +e; (exit $1); exit $1; } # Print warnings (e.g., about skipped and failed tests) to this file number. # Override by defining to say, 9, in init.cfg, and putting say, -# "export ...ENVVAR_SETTINGS...; exec 9>&2; $(SHELL)" in the definition -# of TESTS_ENVIRONMENT in your tests/Makefile.am file. +# export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2 +# in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file. # This is useful when using automake's parallel tests mode, to print # the reason for skip/failure to console, rather than to the .log files. : ${stderr_fileno_=2} @@ -77,6 +77,7 @@ Exit () { set +e; (exit $1); exit $1; } 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. @@ -167,7 +168,10 @@ else st_=$? # $re_shell_ works just fine. Use it. - test $st_ = 10 && break + if test $st_ = 10; then + gl_set_x_corrupts_stderr_=false + break + fi # If this is our first marginally acceptable shell, remember it. if test "$st_:$marginal_" = 9: ; then @@ -400,7 +404,7 @@ mktempd_ () { case $# in 2);; - *) fail_ "Usage: $ME DIR TEMPLATE";; + *) fail_ "Usage: mktempd_ DIR TEMPLATE";; esac destdir_=$1