* [PATCH] t5540: skip under NO_CURL=NoThanks
@ 2015-05-06 16:58 Junio C Hamano
2015-05-06 17:32 ` Jeff King
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2015-05-06 16:58 UTC (permalink / raw)
To: git
All the other tests in t5xxx series that require http support check
NO_CURL and skip the test, but this one forgot to do so.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t5540-http-push-webdav.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/t/t5540-http-push-webdav.sh b/t/t5540-http-push-webdav.sh
index 8d7b3c5..e6aec36 100755
--- a/t/t5540-http-push-webdav.sh
+++ b/t/t5540-http-push-webdav.sh
@@ -9,6 +9,12 @@ This test runs various sanity checks on http-push.'
. ./test-lib.sh
+if test -n "$NO_CURL"
+then
+ skip_all='skipping test, git built without http support'
+ test_done
+fi
+
if git http-push > /dev/null 2>&1 || [ $? -eq 128 ]
then
skip_all="skipping test, USE_CURL_MULTI is not defined"
--
2.4.0-312-gc04835c
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] t5540: skip under NO_CURL=NoThanks
2015-05-06 16:58 [PATCH] t5540: skip under NO_CURL=NoThanks Junio C Hamano
@ 2015-05-06 17:32 ` Jeff King
2015-05-06 17:42 ` Jeff King
2015-05-06 18:49 ` Junio C Hamano
0 siblings, 2 replies; 6+ messages in thread
From: Jeff King @ 2015-05-06 17:32 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Wed, May 06, 2015 at 09:58:06AM -0700, Junio C Hamano wrote:
> All the other tests in t5xxx series that require http support check
> NO_CURL and skip the test, but this one forgot to do so.
Makes sense, though I wonder if this check should just get pushed into
lib-httpd.sh. Surely we can't do anything useful with a web server we
started if we have no curl support? And this seems to support the case:
$ comm -23 <(git grep -l lib-httpd.sh) <(git grep -l NO_CURL)
lib-httpd.sh
t5540-http-push-webdav.sh
After your patch, there is literally no script which includes
lib-httpd.sh but does not respect NO_CURL.
-Peff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] t5540: skip under NO_CURL=NoThanks
2015-05-06 17:32 ` Jeff King
@ 2015-05-06 17:42 ` Jeff King
2015-05-06 18:49 ` Junio C Hamano
1 sibling, 0 replies; 6+ messages in thread
From: Jeff King @ 2015-05-06 17:42 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Wed, May 06, 2015 at 01:32:00PM -0400, Jeff King wrote:
> On Wed, May 06, 2015 at 09:58:06AM -0700, Junio C Hamano wrote:
>
> > All the other tests in t5xxx series that require http support check
> > NO_CURL and skip the test, but this one forgot to do so.
>
> Makes sense, though I wonder if this check should just get pushed into
> lib-httpd.sh. Surely we can't do anything useful with a web server we
> started if we have no curl support? And this seems to support the case:
>
> $ comm -23 <(git grep -l lib-httpd.sh) <(git grep -l NO_CURL)
> lib-httpd.sh
> t5540-http-push-webdav.sh
>
> After your patch, there is literally no script which includes
> lib-httpd.sh but does not respect NO_CURL.
Here's a patch if you want to go that route.
-- >8 --
Subject: 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>
---
t/lib-httpd.sh | 5 +++++
t/t5539-fetch-http-shallow.sh | 6 ------
t/t5541-http-push-smart.sh | 5 -----
t/t5542-push-http-shallow.sh | 6 ------
t/t5550-http-fetch-dumb.sh | 6 ------
t/t5551-http-fetch-smart.sh | 6 ------
t/t5561-http-backend.sh | 6 ------
7 files changed, 5 insertions(+), 35 deletions(-)
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index e6adf2f..c3b5250 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -30,6 +30,11 @@
# Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at>
#
+if test -n "$NO_CURL"; then
+ skip_all='skipping test, git built without http support'
+ test_done
+fi
+
test_tristate GIT_TEST_HTTPD
if test "$GIT_TEST_HTTPD" = false
then
diff --git a/t/t5539-fetch-http-shallow.sh b/t/t5539-fetch-http-shallow.sh
index b461188..37a4335 100755
--- a/t/t5539-fetch-http-shallow.sh
+++ b/t/t5539-fetch-http-shallow.sh
@@ -3,12 +3,6 @@
test_description='fetch/clone from a shallow clone over http'
. ./test-lib.sh
-
-if test -n "$NO_CURL"; then
- skip_all='skipping test, git built without http support'
- test_done
-fi
-
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh
index 9cf27e8..fd7d06b 100755
--- a/t/t5541-http-push-smart.sh
+++ b/t/t5541-http-push-smart.sh
@@ -6,11 +6,6 @@
test_description='test smart pushing over http via http-backend'
. ./test-lib.sh
-if test -n "$NO_CURL"; then
- skip_all='skipping test, git built without http support'
- test_done
-fi
-
ROOT_PATH="$PWD"
. "$TEST_DIRECTORY"/lib-gpg.sh
. "$TEST_DIRECTORY"/lib-httpd.sh
diff --git a/t/t5542-push-http-shallow.sh b/t/t5542-push-http-shallow.sh
index 2a691e0..5165833 100755
--- a/t/t5542-push-http-shallow.sh
+++ b/t/t5542-push-http-shallow.sh
@@ -3,12 +3,6 @@
test_description='push from/to a shallow clone over http'
. ./test-lib.sh
-
-if test -n "$NO_CURL"; then
- say 'skipping test, git built without http support'
- test_done
-fi
-
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh
index 3d11b7a..87a7aa0 100755
--- a/t/t5550-http-fetch-dumb.sh
+++ b/t/t5550-http-fetch-dumb.sh
@@ -2,12 +2,6 @@
test_description='test dumb fetching over http via static file'
. ./test-lib.sh
-
-if test -n "$NO_CURL"; then
- skip_all='skipping test, git built without http support'
- test_done
-fi
-
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
index 66439e5..2b29311 100755
--- a/t/t5551-http-fetch-smart.sh
+++ b/t/t5551-http-fetch-smart.sh
@@ -2,12 +2,6 @@
test_description='test smart fetching over http via http-backend'
. ./test-lib.sh
-
-if test -n "$NO_CURL"; then
- skip_all='skipping test, git built without http support'
- test_done
-fi
-
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
diff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh
index d23fb02..19afe96 100755
--- a/t/t5561-http-backend.sh
+++ b/t/t5561-http-backend.sh
@@ -2,12 +2,6 @@
test_description='test git-http-backend'
. ./test-lib.sh
-
-if test -n "$NO_CURL"; then
- skip_all='skipping test, git built without http support'
- test_done
-fi
-
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
--
2.4.0.488.gf55b16a
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] t5540: skip under NO_CURL=NoThanks
2015-05-06 17:32 ` Jeff King
2015-05-06 17:42 ` Jeff King
@ 2015-05-06 18:49 ` Junio C Hamano
2015-05-07 16:06 ` [PATCH] tests: skip dav http-push tests under NO_EXPAT=NoThanks Junio C Hamano
1 sibling, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2015-05-06 18:49 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, git
Jeff King <peff@peff.net> writes:
> On Wed, May 06, 2015 at 09:58:06AM -0700, Junio C Hamano wrote:
>
>> All the other tests in t5xxx series that require http support check
>> NO_CURL and skip the test, but this one forgot to do so.
>
> Makes sense, though I wonder if this check should just get pushed into
> lib-httpd.sh. Surely we can't do anything useful with a web server we
> started if we have no curl support? And this seems to support the case:
>
> $ comm -23 <(git grep -l lib-httpd.sh) <(git grep -l NO_CURL)
> lib-httpd.sh
> t5540-http-push-webdav.sh
>
> After your patch, there is literally no script which includes
> lib-httpd.sh but does not respect NO_CURL.
Makes perfect sense. Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tests: skip dav http-push tests under NO_EXPAT=NoThanks
2015-05-06 18:49 ` Junio C Hamano
@ 2015-05-07 16:06 ` Junio C Hamano
2015-05-07 16:13 ` Jeff King
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2015-05-07 16:06 UTC (permalink / raw)
To: git; +Cc: Jeff King
When built with NO_EXPAT=NoThanks, we will not have a working http-push
over webdav.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Makefile | 1 +
t/lib-httpd.sh | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/Makefile b/Makefile
index e0caec3..b9ebbf6 100644
--- a/Makefile
+++ b/Makefile
@@ -2188,6 +2188,7 @@ GIT-BUILD-OPTIONS: FORCE
@echo PYTHON_PATH=\''$(subst ','\'',$(PYTHON_PATH_SQ))'\' >>$@
@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
@echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
+ @echo NO_EXPAT=\''$(subst ','\'',$(subst ','\'',$(NO_EXPAT)))'\' >>$@
@echo USE_LIBPCRE=\''$(subst ','\'',$(subst ','\'',$(USE_LIBPCRE)))'\' >>$@
@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
@echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 872a252..d823664 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -36,6 +36,12 @@ then
test_done
fi
+if test -n "$NO_EXPAT" && test -n "$LIB_HTTPD_DAV"
+then
+ skip_all='skipping test, git built without expat support'
+ test_done
+fi
+
test_tristate GIT_TEST_HTTPD
if test "$GIT_TEST_HTTPD" = false
then
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] tests: skip dav http-push tests under NO_EXPAT=NoThanks
2015-05-07 16:06 ` [PATCH] tests: skip dav http-push tests under NO_EXPAT=NoThanks Junio C Hamano
@ 2015-05-07 16:13 ` Jeff King
0 siblings, 0 replies; 6+ messages in thread
From: Jeff King @ 2015-05-07 16:13 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Thu, May 07, 2015 at 09:06:14AM -0700, Junio C Hamano wrote:
> When built with NO_EXPAT=NoThanks, we will not have a working http-push
> over webdav.
Hmph, I used to build with NO_EXPAT long ago and don't remember running
into this, but it is clearly broken now. I wonder what bizarre
combination of leftover build products made it work. ;)
> diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
> index 872a252..d823664 100644
> --- a/t/lib-httpd.sh
> +++ b/t/lib-httpd.sh
> @@ -36,6 +36,12 @@ then
> test_done
> fi
>
> +if test -n "$NO_EXPAT" && test -n "$LIB_HTTPD_DAV"
> +then
> + skip_all='skipping test, git built without expat support'
> + test_done
> +fi
I was confused at first why this is in lib-httpd.sh and not 5540, but I
see LIB_HTTPD_DAV is provided by t5540 as a feature flag to
lib-httpd.sh. I learn something new every day about our test
infrastructure.
-Peff
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-05-07 16:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06 16:58 [PATCH] t5540: skip under NO_CURL=NoThanks Junio C Hamano
2015-05-06 17:32 ` Jeff King
2015-05-06 17:42 ` Jeff King
2015-05-06 18:49 ` Junio C Hamano
2015-05-07 16:06 ` [PATCH] tests: skip dav http-push tests under NO_EXPAT=NoThanks Junio C Hamano
2015-05-07 16:13 ` Jeff King
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.