Skip to content

Commit c9d441a

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 282616c commit c9d441a

7 files changed

+6
-35
lines changed

t/lib-httpd.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
# Copyright (c) 2008 Clemens Buchacher <[email protected]>
3131
#
3232

33+
if test -n "$NO_CURL"
34+
then
35+
skip_all='skipping test, git built without http support'
36+
test_done
37+
fi
38+
3339
test_tristate GIT_TEST_HTTPD
3440
if test "$GIT_TEST_HTTPD" = false
3541
then

t/t5539-fetch-http-shallow.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
test_description='fetch/clone from a shallow clone over http'
44

55
. ./test-lib.sh
6-
7-
if test -n "$NO_CURL"; then
8-
skip_all='skipping test, git built without http support'
9-
test_done
10-
fi
11-
126
. "$TEST_DIRECTORY"/lib-httpd.sh
137
start_httpd
148

t/t5541-http-push-smart.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
test_description='test smart pushing over http via http-backend'
77
. ./test-lib.sh
88

9-
if test -n "$NO_CURL"; then
10-
skip_all='skipping test, git built without http support'
11-
test_done
12-
fi
13-
149
ROOT_PATH="$PWD"
1510
. "$TEST_DIRECTORY"/lib-httpd.sh
1611
. "$TEST_DIRECTORY"/lib-terminal.sh

t/t5542-push-http-shallow.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
test_description='push from/to a shallow clone over http'
44

55
. ./test-lib.sh
6-
7-
if test -n "$NO_CURL"; then
8-
say 'skipping test, git built without http support'
9-
test_done
10-
fi
11-
126
. "$TEST_DIRECTORY"/lib-httpd.sh
137
start_httpd
148

t/t5550-http-fetch-dumb.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
test_description='test dumb fetching over http via static file'
44
. ./test-lib.sh
5-
6-
if test -n "$NO_CURL"; then
7-
skip_all='skipping test, git built without http support'
8-
test_done
9-
fi
10-
115
. "$TEST_DIRECTORY"/lib-httpd.sh
126
start_httpd
137

t/t5551-http-fetch-smart.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
test_description='test smart fetching over http via http-backend'
44
. ./test-lib.sh
5-
6-
if test -n "$NO_CURL"; then
7-
skip_all='skipping test, git built without http support'
8-
test_done
9-
fi
10-
115
. "$TEST_DIRECTORY"/lib-httpd.sh
126
start_httpd
137

t/t5561-http-backend.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
test_description='test git-http-backend'
44
. ./test-lib.sh
5-
6-
if test -n "$NO_CURL"; then
7-
skip_all='skipping test, git built without http support'
8-
test_done
9-
fi
10-
115
. "$TEST_DIRECTORY"/lib-httpd.sh
126
start_httpd
137

0 commit comments

Comments
 (0)