summaryrefslogtreecommitdiff
path: root/t/self-check-exit.tap
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2011-12-28 13:23:31 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-05-07 22:08:37 +0200
commit6b641de5fc4ecf679d77a7542f83b1d04402c798 (patch)
treeee8af6bb95a5f25eaf8893ab02905330d6386760 /t/self-check-exit.tap
parent2d68fd9b481762a31847cf412fedb68decf6e8fd (diff)
downloadautomake-6b641de5fc4ecf679d77a7542f83b1d04402c798.tar.gz
tests: remove obsolete uses of $sh_errexit_works
After the last changes, configure will ensure that the shell selected to run the test scripts can correctly propagate exit status to the exit trap when 'set -e' is in effect. * configure.ac (sh_errexit_works): Do not AC_SUBST it anymore. * defs-static.in (sh_errexit_works): Do not initialize from the AC_SUBST value anymore. * defs (trap): Trap the EXIT signal unconditionally. * t/self-check-explicit-skips.sh: Do not skip the test if '$sh_errexit_works' is != "yes", this check doesn't make sense anymore. * t/self-check-cleanup.tap: Likewise. * t/self-check-exit.tap: Assume the exit trap is always installed by ./defs. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/self-check-exit.tap')
-rwxr-xr-xt/self-check-exit.tap13
1 files changed, 1 insertions, 12 deletions
diff --git a/t/self-check-exit.tap b/t/self-check-exit.tap
index 029b17424..1d3c0202b 100755
--- a/t/self-check-exit.tap
+++ b/t/self-check-exit.tap
@@ -65,18 +65,7 @@ for sig in 1 2 13 15; do
# Reset default SIGINT handler as portably as possible.
trap 2 || trap - 2
fi
- if test x"$sh_errexit_works" = x"yes"; then
- # The exit trap should turn into an hard errors any failure
- # caused by signals.
- command_ok_ "kill -$sig" test $rc -eq 99
- else
- # The exit trap is not installed, so that the shell should exit
- # with status 128+n when receiving signal number n. But don't
- # be too strict in the check, as POSIX only says that "The exit
- # status of a command that terminated because it received a
- # signal shall be reported as greater than 128".
- command_ok_ "kill -$sig" test $rc -gt 128
- fi
+ command_ok_ "kill -$sig" test $rc -eq 99
unset rc
done