summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bc08fc4)
raw | patch | inline | side by side (parent: bc08fc4)
author | Markus Heidelberg <markus.heidelberg@web.de> | |
Mon, 19 Jan 2009 23:43:26 +0000 (00:43 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 20 Jan 2009 06:39:31 +0000 (22:39 -0800) |
In 'man 1p trap' there is written:
"Implementations may permit names with the SIG prefix or ignore case
in signal names as an extension."
So change the lowercase signals to uppercase, which is POSIX compliant
instead of being an extension.
There wasn't anybody claiming that it doesn't work, but there was a bug
with using a signal with the SIG prefix, which is an extension as well.
So let's play it safe and change it, since it doesn't hurt anyone.
While at it, also convert 8 indentation spaces to 1 tab character.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
"Implementations may permit names with the SIG prefix or ignore case
in signal names as an extension."
So change the lowercase signals to uppercase, which is POSIX compliant
instead of being an extension.
There wasn't anybody claiming that it doesn't work, but there was a bug
with using a signal with the SIG prefix, which is an extension as well.
So let's play it safe and change it, since it doesn't hurt anyone.
While at it, also convert 8 indentation spaces to 1 tab character.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-httpd.sh | patch | blob | history | |
t/test-lib.sh | patch | blob | history |
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 6ac312b9059394b44cd6e106f9da6394674ee54a..3824020ca12a4c972a3e1bc8324dcd5ab6094633 100644 (file)
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
if ! test -x "$LIB_HTTPD_PATH"
then
- say "skipping test, no web server found at '$LIB_HTTPD_PATH'"
- test_done
- exit
+ say "skipping test, no web server found at '$LIB_HTTPD_PATH'"
+ test_done
+ exit
fi
HTTPD_VERSION=`$LIB_HTTPD_PATH -v | \
start_httpd() {
prepare_httpd
- trap 'stop_httpd; die' exit
+ trap 'stop_httpd; die' EXIT
"$LIB_HTTPD_PATH" -d "$HTTPD_ROOT_PATH" \
-f "$TEST_PATH/apache.conf" $HTTPD_PARA \
}
stop_httpd() {
- trap 'die' exit
+ trap 'die' EXIT
"$LIB_HTTPD_PATH" -d "$HTTPD_ROOT_PATH" \
-f "$TEST_PATH/apache.conf" -k stop
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 22ed448d560bfd517014315b2b7a32f8daba79b2..41d5a5996ebcf243be067991e65eca6060f54f46 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
error () {
say_color error "error: $*"
- trap - exit
+ trap - EXIT
exit 1
}
exit 1
}
-trap 'die' exit
+trap 'die' EXIT
# The semantics of the editor variables are that of invoking
# sh -c "$EDITOR \"$@\"" files ...
say_color error "FAIL $test_count: $1"
shift
echo "$@" | sed -e 's/^/ /'
- test "$immediate" = "" || { trap - exit; exit 1; }
+ test "$immediate" = "" || { trap - EXIT; exit 1; }
}
test_known_broken_ok_ () {
}
test_done () {
- trap - exit
+ trap - EXIT
test_results_dir="$TEST_DIRECTORY/test-results"
mkdir -p "$test_results_dir"
test_results_path="$test_results_dir/${0%-*}-$$"
test="trash directory.$(basename "$0" .sh)"
test ! -z "$debug" || remove_trash="$TEST_DIRECTORY/$test"
rm -fr "$test" || {
- trap - exit
+ trap - EXIT
echo >&5 "FATAL: Cannot prepare test area"
exit 1
}