Merge branch 'jk/t5561-missing-curl'
authorJunio C Hamano <gitster@pobox.com>
Wed, 25 Apr 2018 04:28:53 +0000 (13:28 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Apr 2018 04:28:53 +0000 (13:28 +0900)
Test fixes.

* jk/t5561-missing-curl:
t5561: skip tests if curl is not available
t5561: drop curl stderr redirects

t/t5561-http-backend.sh
t/test-lib.sh
index 90e0d6f0fe935970c0941bfef2af39bb15d2f959..84a955770a017e68d0cc1e928929e5a043d64e86 100755 (executable)
@@ -3,10 +3,16 @@
 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() {
-       curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out 2>/dev/null &&
+       curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out &&
        tr '\015' Q <out |
        sed '
                s/Q$//
@@ -19,7 +25,7 @@ GET() {
 POST() {
        curl --include --data "$2" \
        --header "Content-Type: application/x-$1-request" \
-       "$HTTPD_URL/smart/repo.git/$1" >out 2>/dev/null &&
+       "$HTTPD_URL/smart/repo.git/$1" >out &&
        tr '\015' Q <out |
        sed '
                s/Q$//
index 483c8d6d7cd9734c04552043b5ff0cb7d1b0af3a..ea2bbaaa7ab4dc77d0ef13cafbe45d1b12bd67e8 100644 (file)
@@ -1208,3 +1208,7 @@ test_lazy_prereq LONG_IS_64BIT '
 
 test_lazy_prereq TIME_IS_64BIT 'test-tool date is64bit'
 test_lazy_prereq TIME_T_IS_64BIT 'test-tool date time_t-is64bit'
+
+test_lazy_prereq CURL '
+       curl --version
+'