Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2009-06-01 16:28:25 +0400
committerJunio C Hamano <gitster@pobox.com>2009-06-02 09:45:01 +0400
commita5adcbe377de7c8f5d794fce1fe2b23a0bddf758 (patch)
treed351f37b2c9befdf8657f6a5d0c1a855e361bd29 /t/lib-httpd.sh
parent6e7b5aaf40dac54edcbd7e0a859d26f526ef643e (diff)
test-lib: fix http exit codes
Previously, die() would report the exit code of stop_httpd. Instead, save and reset the exit code before dying. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-httpd.sh')
-rw-r--r--t/lib-httpd.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index cde659d14a..6765b08065 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -93,14 +93,16 @@ prepare_httpd() {
start_httpd() {
prepare_httpd >&3 2>&4
- trap 'stop_httpd; die' EXIT
+ trap 'code=$?; stop_httpd; (exit $code); die' EXIT
"$LIB_HTTPD_PATH" -d "$HTTPD_ROOT_PATH" \
-f "$TEST_PATH/apache.conf" $HTTPD_PARA \
-c "Listen 127.0.0.1:$LIB_HTTPD_PORT" -k start \
>&3 2>&4
- if ! test $? = 0; then
+ if test $? -ne 0
+ then
say "skipping test, web server setup failed"
+ trap 'die' EXIT
test_done
fi
}