changeset 835:9de3535caae8

Cleaned up trap handling in run-tests, too.
author Thomas Arendsen Hein <thomas@intevation.de>
date Thu, 04 Aug 2005 18:23:07 +0100
parents 78a9f95766dc
children 1fe3b14c7044
files tests/run-tests
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests	Thu Aug 04 18:20:40 2005 +0100
+++ b/tests/run-tests	Thu Aug 04 18:23:07 2005 +0100
@@ -27,11 +27,11 @@
 HGTMP=""
 cleanup_exit() {
     rm -rf "$HGTMP"
-    exit $1
 }
 
 # Remove temporary files even if we get interrupted
-trap "cleanup_exit 255" TERM KILL INT QUIT ABRT
+trap "cleanup_exit" 0 # normal exit
+trap "exit 255" 1 2 3 6 15 # HUP INT QUIT ABRT TERM
 
 HGTMP="${TMPDIR-/tmp}/hgtests.$RANDOM.$RANDOM.$RANDOM.$$"
 (umask 077 && mkdir "$HGTMP") || {
@@ -61,7 +61,7 @@
     chmod 755 "$INST/bin/hg"
 else
     cat tests/install.err
-    cleanup_exit 1
+    exit 1
 fi
 cd "$TESTDIR"
 
@@ -126,6 +126,6 @@
 echo "Ran $tests tests, $failed failed."
 
 if [ $failed -gt 0 ] ; then
-    cleanup_exit 1
+    exit 1
 fi
-cleanup_exit 0
+exit 0