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:
authorJunio C Hamano <gitster@pobox.com>2014-03-06 03:06:42 +0400
committerJunio C Hamano <gitster@pobox.com>2014-03-06 03:06:45 +0400
commitee3a81e69cde27add025e206cd9dd2937c80f230 (patch)
tree7d0d11091854293753e3bc7831f9bc77699212e1 /t/lib-httpd.sh
parent4c4ac4db2c933fbae1c6e6bcf90d9bee5f823fc7 (diff)
parent83d842dc8ce4380aa365485b4d9845762f80c6db (diff)
Merge branch 'jk/run-network-tests-by-default'
Teach "make test" to run networking tests when possible by default. * jk/run-network-tests-by-default: tests: turn on network daemon tests by default
Diffstat (limited to 't/lib-httpd.sh')
-rw-r--r--t/lib-httpd.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index b43162ea2a..252cbf163b 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -30,9 +30,10 @@
# Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at>
#
-if test -z "$GIT_TEST_HTTPD"
+test_tristate GIT_TEST_HTTPD
+if test "$GIT_TEST_HTTPD" = false
then
- skip_all="Network testing disabled (define GIT_TEST_HTTPD to enable)"
+ skip_all="Network testing disabled (unset GIT_TEST_HTTPD to enable)"
test_done
fi
@@ -76,8 +77,7 @@ GIT_VALGRIND_OPTIONS=$GIT_VALGRIND_OPTIONS; export GIT_VALGRIND_OPTIONS
if ! test -x "$LIB_HTTPD_PATH"
then
- skip_all="skipping test, no web server found at '$LIB_HTTPD_PATH'"
- test_done
+ test_skip_or_die $GIT_TEST_HTTPD "no web server found at '$LIB_HTTPD_PATH'"
fi
HTTPD_VERSION=`$LIB_HTTPD_PATH -v | \
@@ -89,19 +89,20 @@ then
then
if ! test $HTTPD_VERSION -ge 2
then
- skip_all="skipping test, at least Apache version 2 is required"
- test_done
+ test_skip_or_die $GIT_TEST_HTTPD \
+ "at least Apache version 2 is required"
fi
if ! test -d "$DEFAULT_HTTPD_MODULE_PATH"
then
- skip_all="Apache module directory not found. Skipping tests."
- test_done
+ test_skip_or_die $GIT_TEST_HTTPD \
+ "Apache module directory not found"
fi
LIB_HTTPD_MODULE_PATH="$DEFAULT_HTTPD_MODULE_PATH"
fi
else
- error "Could not identify web server at '$LIB_HTTPD_PATH'"
+ test_skip_or_die $GIT_TEST_HTTPD \
+ "Could not identify web server at '$LIB_HTTPD_PATH'"
fi
prepare_httpd() {
@@ -155,9 +156,8 @@ start_httpd() {
>&3 2>&4
if test $? -ne 0
then
- skip_all="skipping test, web server setup failed"
trap 'die' EXIT
- test_done
+ test_skip_or_die $GIT_TEST_HTTPD "web server setup failed"
fi
}