summaryrefslogtreecommitdiff
path: root/t/t5561-http-backend.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-04-03 14:01:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-05 07:21:41 (GMT)
commite9184b0789abdcc701e75d731bfd2b126b599490 (patch)
treeaa030825ad5c893467cf92cba572208e3135c256 /t/t5561-http-backend.sh
parentfcd9d7096f0ca475b9926355d13ef7679ff99680 (diff)
downloadgit-e9184b0789abdcc701e75d731bfd2b126b599490.zip
git-e9184b0789abdcc701e75d731bfd2b126b599490.tar.gz
git-e9184b0789abdcc701e75d731bfd2b126b599490.tar.bz2
t5561: skip tests if curl is not available
It's possible to have libcurl installed but not the curl command-line utility. The latter is not generally needed for Git's http support, but we use it in t5561 for basic tests of http-backend's functionality. Let's detect when it's missing and skip this test. Note that we can't mark the individual tests with the CURL prerequisite. They're in a shared t556x_common that uses the GET and POST functions as a level of indirection, and it's only our implementations of those functions in t5561 that requires curl. It's not a problem, though, as literally every test in the script would depend on the prerequisite anyway. Reported-by: Jens Kr├╝ger <Jens.Krueger@frm2.tum.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5561-http-backend.sh')
-rwxr-xr-xt/t5561-http-backend.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh
index 6167563..84a9557 100755
--- a/t/t5561-http-backend.sh
+++ b/t/t5561-http-backend.sh
@@ -3,6 +3,12 @@
test_description='test git-http-backend'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-httpd.sh
+
+if ! test_have_prereq CURL; then
+ skip_all='skipping raw http-backend tests, curl not available'
+ test_done
+fi
+
start_httpd
GET() {