Skip to content

Commit e6986ab

Browse files
committed
Merge branch 'jk/t5561-missing-curl'
Test fixes. * jk/t5561-missing-curl: t5561: skip tests if curl is not available t5561: drop curl stderr redirects
2 parents 8295f20 + e9184b0 commit e6986ab

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

t/t5561-http-backend.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@
33
test_description='test git-http-backend'
44
. ./test-lib.sh
55
. "$TEST_DIRECTORY"/lib-httpd.sh
6+
7+
if ! test_have_prereq CURL; then
8+
skip_all='skipping raw http-backend tests, curl not available'
9+
test_done
10+
fi
11+
612
start_httpd
713

814
GET() {
9-
curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out 2>/dev/null &&
15+
curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out &&
1016
tr '\015' Q <out |
1117
sed '
1218
s/Q$//
@@ -19,7 +25,7 @@ GET() {
1925
POST() {
2026
curl --include --data "$2" \
2127
--header "Content-Type: application/x-$1-request" \
22-
"$HTTPD_URL/smart/repo.git/$1" >out 2>/dev/null &&
28+
"$HTTPD_URL/smart/repo.git/$1" >out &&
2329
tr '\015' Q <out |
2430
sed '
2531
s/Q$//

t/test-lib.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,3 +1208,7 @@ test_lazy_prereq LONG_IS_64BIT '
12081208

12091209
test_lazy_prereq TIME_IS_64BIT 'test-tool date is64bit'
12101210
test_lazy_prereq TIME_T_IS_64BIT 'test-tool date time_t-is64bit'
1211+
1212+
test_lazy_prereq CURL '
1213+
curl --version
1214+
'

0 commit comments

Comments
 (0)