diff options
author | Jeff King <peff@peff.net> | 2015-05-06 13:42:29 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-07 08:26:02 -0700 |
commit | c9d441a899a96185cff7ca798dcf69af9825c2ff (patch) | |
tree | 8ad37b7e65747965f29b6cac3b70ad573480646c | |
parent | Merge branch 'maint-1.9' into maint-2.0 (diff) | |
download | tgif-c9d441a899a96185cff7ca798dcf69af9825c2ff.tar.xz |
t/lib-httpd.sh: skip tests if NO_CURL is defined
If we built git without curl, we can't actually test against
an http server. In fact, all of the test scripts which
include lib-httpd.sh already perform this check, with one
exception: t5540. For those scripts, this is a noop, and for
t5540, this is a bugfix (it used to fail when built with
NO_CURL, though it could go unnoticed if you had a stale
git-remote-https in your build directory).
Noticed-by: Junio C Hamano <junio@pobox.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | t/lib-httpd.sh | 6 | ||||
-rwxr-xr-x | t/t5539-fetch-http-shallow.sh | 6 | ||||
-rwxr-xr-x | t/t5541-http-push-smart.sh | 5 | ||||
-rwxr-xr-x | t/t5542-push-http-shallow.sh | 6 | ||||
-rwxr-xr-x | t/t5550-http-fetch-dumb.sh | 6 | ||||
-rwxr-xr-x | t/t5551-http-fetch-smart.sh | 6 | ||||
-rwxr-xr-x | t/t5561-http-backend.sh | 6 |
7 files changed, 6 insertions, 35 deletions
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh index 252cbf163b..872a252d58 100644 --- a/t/lib-httpd.sh +++ b/t/lib-httpd.sh @@ -30,6 +30,12 @@ # Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at> # +if test -n "$NO_CURL" +then + skip_all='skipping test, git built without http support' + test_done +fi + test_tristate GIT_TEST_HTTPD if test "$GIT_TEST_HTTPD" = false then diff --git a/t/t5539-fetch-http-shallow.sh b/t/t5539-fetch-http-shallow.sh index 94553e1039..f1cbf96699 100755 --- a/t/t5539-fetch-http-shallow.sh +++ b/t/t5539-fetch-http-shallow.sh @@ -3,12 +3,6 @@ test_description='fetch/clone from a shallow clone over http' . ./test-lib.sh - -if test -n "$NO_CURL"; then - skip_all='skipping test, git built without http support' - test_done -fi - . "$TEST_DIRECTORY"/lib-httpd.sh start_httpd diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh index 73af16f481..2d378f5afc 100755 --- a/t/t5541-http-push-smart.sh +++ b/t/t5541-http-push-smart.sh @@ -6,11 +6,6 @@ test_description='test smart pushing over http via http-backend' . ./test-lib.sh -if test -n "$NO_CURL"; then - skip_all='skipping test, git built without http support' - test_done -fi - ROOT_PATH="$PWD" . "$TEST_DIRECTORY"/lib-httpd.sh . "$TEST_DIRECTORY"/lib-terminal.sh diff --git a/t/t5542-push-http-shallow.sh b/t/t5542-push-http-shallow.sh index 2a691e09eb..5165833157 100755 --- a/t/t5542-push-http-shallow.sh +++ b/t/t5542-push-http-shallow.sh @@ -3,12 +3,6 @@ test_description='push from/to a shallow clone over http' . ./test-lib.sh - -if test -n "$NO_CURL"; then - say 'skipping test, git built without http support' - test_done -fi - . "$TEST_DIRECTORY"/lib-httpd.sh start_httpd diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh index 1a3a2b6c1a..2d9249cf90 100755 --- a/t/t5550-http-fetch-dumb.sh +++ b/t/t5550-http-fetch-dumb.sh @@ -2,12 +2,6 @@ test_description='test dumb fetching over http via static file' . ./test-lib.sh - -if test -n "$NO_CURL"; then - skip_all='skipping test, git built without http support' - test_done -fi - . "$TEST_DIRECTORY"/lib-httpd.sh start_httpd diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh index e07eaf35f1..7c27edb17d 100755 --- a/t/t5551-http-fetch-smart.sh +++ b/t/t5551-http-fetch-smart.sh @@ -2,12 +2,6 @@ test_description='test smart fetching over http via http-backend' . ./test-lib.sh - -if test -n "$NO_CURL"; then - skip_all='skipping test, git built without http support' - test_done -fi - . "$TEST_DIRECTORY"/lib-httpd.sh start_httpd diff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh index d23fb02384..19afe96698 100755 --- a/t/t5561-http-backend.sh +++ b/t/t5561-http-backend.sh @@ -2,12 +2,6 @@ test_description='test git-http-backend' . ./test-lib.sh - -if test -n "$NO_CURL"; then - skip_all='skipping test, git built without http support' - test_done -fi - . "$TEST_DIRECTORY"/lib-httpd.sh start_httpd |