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 <junio@pobox.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
May 6, 2015 at 13:42 UTC
c9d441a899a96185cff7ca798dcf69af9825c2ff
7 files changed
+6
-35
t/lib-httpd.sh
+6
@@ -30,6 +30,12 @@
30
# Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at>
31
#
32
33
+if test -n "$NO_CURL"
34
+then
35
+ skip_all='skipping test, git built without http support'
36
+ test_done
37
+fi
38
+
39
test_tristate GIT_TEST_HTTPD
40
if test "$GIT_TEST_HTTPD" = false
41
then
t/t5539-fetch-http-shallow.sh
-6
@@ -3,12 +3,6 @@
3
test_description='fetch/clone from a shallow clone over http'
4
5
. ./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
-
6
. "$TEST_DIRECTORY"/lib-httpd.sh
7
start_httpd
8
t/t5541-http-push-smart.sh
-5
@@ -6,11 +6,6 @@
6
test_description='test smart pushing over http via http-backend'
7
. ./test-lib.sh
8
9
-if test -n "$NO_CURL"; then
10
- skip_all='skipping test, git built without http support'
11
- test_done
12
-fi
13
-
9
ROOT_PATH="$PWD"
10
. "$TEST_DIRECTORY"/lib-httpd.sh
11
. "$TEST_DIRECTORY"/lib-terminal.sh
t/t5542-push-http-shallow.sh
-6
@@ -3,12 +3,6 @@
3
test_description='push from/to a shallow clone over http'
4
5
. ./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
-
6
. "$TEST_DIRECTORY"/lib-httpd.sh
7
start_httpd
8
t/t5550-http-fetch-dumb.sh
-6
@@ -2,12 +2,6 @@
2
3
test_description='test dumb fetching over http via static file'
4
. ./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
-
5
. "$TEST_DIRECTORY"/lib-httpd.sh
6
start_httpd
7
t/t5551-http-fetch-smart.sh
-6
@@ -2,12 +2,6 @@
2
3
test_description='test smart fetching over http via http-backend'
4
. ./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
-
5
. "$TEST_DIRECTORY"/lib-httpd.sh
6
start_httpd
7
t/t5561-http-backend.sh
-6
@@ -2,12 +2,6 @@
2
3
test_description='test git-http-backend'
4
. ./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
-
5
. "$TEST_DIRECTORY"/lib-httpd.sh
6
start_httpd
7