t/lib-httpd.sh: skip tests if NO_CURL is defined
authorJeff King <peff@peff.net>
Wed, 6 May 2015 17:42:29 +0000 (13:42 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 May 2015 15:26:02 +0000 (08:26 -0700)
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>
t/lib-httpd.sh
t/t5539-fetch-http-shallow.sh
t/t5541-http-push-smart.sh
t/t5542-push-http-shallow.sh
t/t5550-http-fetch-dumb.sh
t/t5551-http-fetch-smart.sh
t/t5561-http-backend.sh
index 252cbf163bcff90aabe39a48219e00565f577ffe..872a252d580a8c3a7001f551d08c028f35dcf410 100644 (file)
 # 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
index 94553e103968433aa55fd882a3006b375999759e..f1cbf966993861c005624542aafadc280312486e 100755 (executable)
@@ -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
 
index 73af16f481836d3cbfa8a2f82c260d10a3a43c09..2d378f5afcf3abde71e0bb52dc73a76132984af2 100755 (executable)
@@ -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
index 2a691e09ebe5f35e5a1aff6c710e6b4dc525f0d6..51658331571611c568def54be28072f426c48e66 100755 (executable)
@@ -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
 
index 1a3a2b6c1a20558a019143d1abbd2168af0caf53..2d9249cf90e6c6770cc282a7c7159d343d7aa0d4 100755 (executable)
@@ -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
 
index e07eaf35f118893da9240f12d115da1affd5eb05..7c27edb17d6617e9b02cc7cf8d55102fdc492b3f 100755 (executable)
@@ -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
 
index d23fb0238483520e77004a208f15db808941b4af..19afe966986cdc72cf8fc23f113bd77a8128f382 100755 (executable)
@@ -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