{"thread":{"id":"39260","subject":"[PATCH] t5540: skip under NO_CURL=NoThanks","startedAt":"2015-05-06T16:58:06Z","lastAt":"2015-05-07T16:13:11Z","messageCount":6,"participants":["Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"260664","messageId":"xmqq6185d4o1.fsf@gitster.dls.corp.google.com","threadId":"39260","inReplyTo":null,"subject":"[PATCH] t5540: skip under NO_CURL=NoThanks","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2015-05-06T16:58:06Z","receivedAt":"2015-05-06T16:58:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"All the other tests in t5xxx series that require http support check\nNO_CURL and skip the test, but this one forgot to do so.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t5540-http-push-webdav.sh | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/t/t5540-http-push-webdav.sh b/t/t5540-http-push-webdav.sh\nindex 8d7b3c5..e6aec36 100755\n--- a/t/t5540-http-push-webdav.sh\n+++ b/t/t5540-http-push-webdav.sh\n@@ -9,6 +9,12 @@ This test runs various sanity checks on http-push.'\n \n . ./test-lib.sh\n \n+if test -n \"$NO_CURL\"\n+then\n+\tskip_all='skipping test, git built without http support'\n+\ttest_done\n+fi\n+\n if git http-push > /dev/null 2>&1 || [ $? -eq 128 ]\n then\n \tskip_all=\"skipping test, USE_CURL_MULTI is not defined\"\n-- \n2.4.0-312-gc04835c\n"},{"id":"260668","messageId":"20150506173200.GA7985@peff.net","threadId":"39260","inReplyTo":"xmqq6185d4o1.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] t5540: skip under NO_CURL=NoThanks","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-05-06T17:32:00Z","receivedAt":"2015-05-06T17:32:00Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 06, 2015 at 09:58:06AM -0700, Junio C Hamano wrote:\n\n> All the other tests in t5xxx series that require http support check\n> NO_CURL and skip the test, but this one forgot to do so.\n\nMakes sense, though I wonder if this check should just get pushed into\nlib-httpd.sh. Surely we can't do anything useful with a web server we\nstarted if we have no curl support? And this seems to support the case:\n\n  $ comm -23 <(git grep -l lib-httpd.sh) <(git grep -l NO_CURL)\n  lib-httpd.sh\n  t5540-http-push-webdav.sh\n\nAfter your patch, there is literally no script which includes\nlib-httpd.sh but does not respect NO_CURL.\n\n-Peff\n"},{"id":"260669","messageId":"20150506174229.GA8497@peff.net","threadId":"39260","inReplyTo":"20150506173200.GA7985@peff.net","subject":"Re: [PATCH] t5540: skip under NO_CURL=NoThanks","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-05-06T17:42:29Z","receivedAt":"2015-05-06T17:42:29Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 06, 2015 at 01:32:00PM -0400, Jeff King wrote:\n\n> On Wed, May 06, 2015 at 09:58:06AM -0700, Junio C Hamano wrote:\n> \n> > All the other tests in t5xxx series that require http support check\n> > NO_CURL and skip the test, but this one forgot to do so.\n> \n> Makes sense, though I wonder if this check should just get pushed into\n> lib-httpd.sh. Surely we can't do anything useful with a web server we\n> started if we have no curl support? And this seems to support the case:\n> \n>   $ comm -23 <(git grep -l lib-httpd.sh) <(git grep -l NO_CURL)\n>   lib-httpd.sh\n>   t5540-http-push-webdav.sh\n> \n> After your patch, there is literally no script which includes\n> lib-httpd.sh but does not respect NO_CURL.\n\nHere's a patch if you want to go that route.\n\n-- >8 --\nSubject: t/lib-httpd.sh: skip tests if NO_CURL is defined\n\nIf we built git without curl, we can't actually test against\nan http server. In fact, all of the test scripts which\ninclude lib-httpd.sh already perform this check, with one\nexception: t5540. For those scripts, this is a noop, and for\nt5540, this is a bugfix (it used to fail when built with\nNO_CURL, though it could go unnoticed if you had a stale\ngit-remote-https in your build directory).\n\nNoticed-by: Junio C Hamano <junio@pobox.com>\nSigned-off-by: Jeff King <peff@peff.net>\n---\n t/lib-httpd.sh                | 5 +++++\n t/t5539-fetch-http-shallow.sh | 6 ------\n t/t5541-http-push-smart.sh    | 5 -----\n t/t5542-push-http-shallow.sh  | 6 ------\n t/t5550-http-fetch-dumb.sh    | 6 ------\n t/t5551-http-fetch-smart.sh   | 6 ------\n t/t5561-http-backend.sh       | 6 ------\n 7 files changed, 5 insertions(+), 35 deletions(-)\n\ndiff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\nindex e6adf2f..c3b5250 100644\n--- a/t/lib-httpd.sh\n+++ b/t/lib-httpd.sh\n@@ -30,6 +30,11 @@\n # Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at>\n #\n \n+if test -n \"$NO_CURL\"; then\n+\tskip_all='skipping test, git built without http support'\n+\ttest_done\n+fi\n+\n test_tristate GIT_TEST_HTTPD\n if test \"$GIT_TEST_HTTPD\" = false\n then\ndiff --git a/t/t5539-fetch-http-shallow.sh b/t/t5539-fetch-http-shallow.sh\nindex b461188..37a4335 100755\n--- a/t/t5539-fetch-http-shallow.sh\n+++ b/t/t5539-fetch-http-shallow.sh\n@@ -3,12 +3,6 @@\n test_description='fetch/clone from a shallow clone over http'\n \n . ./test-lib.sh\n-\n-if test -n \"$NO_CURL\"; then\n-\tskip_all='skipping test, git built without http support'\n-\ttest_done\n-fi\n-\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\n \ndiff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh\nindex 9cf27e8..fd7d06b 100755\n--- a/t/t5541-http-push-smart.sh\n+++ b/t/t5541-http-push-smart.sh\n@@ -6,11 +6,6 @@\n test_description='test smart pushing over http via http-backend'\n . ./test-lib.sh\n \n-if test -n \"$NO_CURL\"; then\n-\tskip_all='skipping test, git built without http support'\n-\ttest_done\n-fi\n-\n ROOT_PATH=\"$PWD\"\n . \"$TEST_DIRECTORY\"/lib-gpg.sh\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\ndiff --git a/t/t5542-push-http-shallow.sh b/t/t5542-push-http-shallow.sh\nindex 2a691e0..5165833 100755\n--- a/t/t5542-push-http-shallow.sh\n+++ b/t/t5542-push-http-shallow.sh\n@@ -3,12 +3,6 @@\n test_description='push from/to a shallow clone over http'\n \n . ./test-lib.sh\n-\n-if test -n \"$NO_CURL\"; then\n-\tsay 'skipping test, git built without http support'\n-\ttest_done\n-fi\n-\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\n \ndiff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh\nindex 3d11b7a..87a7aa0 100755\n--- a/t/t5550-http-fetch-dumb.sh\n+++ b/t/t5550-http-fetch-dumb.sh\n@@ -2,12 +2,6 @@\n \n test_description='test dumb fetching over http via static file'\n . ./test-lib.sh\n-\n-if test -n \"$NO_CURL\"; then\n-\tskip_all='skipping test, git built without http support'\n-\ttest_done\n-fi\n-\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\n \ndiff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh\nindex 66439e5..2b29311 100755\n--- a/t/t5551-http-fetch-smart.sh\n+++ b/t/t5551-http-fetch-smart.sh\n@@ -2,12 +2,6 @@\n \n test_description='test smart fetching over http via http-backend'\n . ./test-lib.sh\n-\n-if test -n \"$NO_CURL\"; then\n-\tskip_all='skipping test, git built without http support'\n-\ttest_done\n-fi\n-\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\n \ndiff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh\nindex d23fb02..19afe96 100755\n--- a/t/t5561-http-backend.sh\n+++ b/t/t5561-http-backend.sh\n@@ -2,12 +2,6 @@\n \n test_description='test git-http-backend'\n . ./test-lib.sh\n-\n-if test -n \"$NO_CURL\"; then\n-\tskip_all='skipping test, git built without http support'\n-\ttest_done\n-fi\n-\n . \"$TEST_DIRECTORY\"/lib-httpd.sh\n start_httpd\n \n-- \n2.4.0.488.gf55b16a\n"},{"id":"260676","messageId":"xmqqvbg5tubj.fsf@gitster.dls.corp.google.com","threadId":"39260","inReplyTo":"20150506173200.GA7985@peff.net","subject":"Re: [PATCH] t5540: skip under NO_CURL=NoThanks","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-06T18:49:36Z","receivedAt":"2015-05-06T18:49:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Wed, May 06, 2015 at 09:58:06AM -0700, Junio C Hamano wrote:\n>\n>> All the other tests in t5xxx series that require http support check\n>> NO_CURL and skip the test, but this one forgot to do so.\n>\n> Makes sense, though I wonder if this check should just get pushed into\n> lib-httpd.sh. Surely we can't do anything useful with a web server we\n> started if we have no curl support? And this seems to support the case:\n>\n>   $ comm -23 <(git grep -l lib-httpd.sh) <(git grep -l NO_CURL)\n>   lib-httpd.sh\n>   t5540-http-push-webdav.sh\n>\n> After your patch, there is literally no script which includes\n> lib-httpd.sh but does not respect NO_CURL.\n\nMakes perfect sense.  Thanks.\n"},{"id":"260733","messageId":"xmqqzj5gqsnd.fsf_-_@gitster.dls.corp.google.com","threadId":"39260","inReplyTo":"xmqqvbg5tubj.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] tests: skip dav http-push tests under NO_EXPAT=NoThanks","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-07T16:06:14Z","receivedAt":"2015-05-07T16:06:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When built with NO_EXPAT=NoThanks, we will not have a working http-push\nover webdav.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n Makefile       | 1 +\n t/lib-httpd.sh | 6 ++++++\n 2 files changed, 7 insertions(+)\n\ndiff --git a/Makefile b/Makefile\nindex e0caec3..b9ebbf6 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2188,6 +2188,7 @@ GIT-BUILD-OPTIONS: FORCE\n \t@echo PYTHON_PATH=\\''$(subst ','\\'',$(PYTHON_PATH_SQ))'\\' >>$@\n \t@echo TAR=\\''$(subst ','\\'',$(subst ','\\'',$(TAR)))'\\' >>$@\n \t@echo NO_CURL=\\''$(subst ','\\'',$(subst ','\\'',$(NO_CURL)))'\\' >>$@\n+\t@echo NO_EXPAT=\\''$(subst ','\\'',$(subst ','\\'',$(NO_EXPAT)))'\\' >>$@\n \t@echo USE_LIBPCRE=\\''$(subst ','\\'',$(subst ','\\'',$(USE_LIBPCRE)))'\\' >>$@\n \t@echo NO_PERL=\\''$(subst ','\\'',$(subst ','\\'',$(NO_PERL)))'\\' >>$@\n \t@echo NO_PYTHON=\\''$(subst ','\\'',$(subst ','\\'',$(NO_PYTHON)))'\\' >>$@\ndiff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\nindex 872a252..d823664 100644\n--- a/t/lib-httpd.sh\n+++ b/t/lib-httpd.sh\n@@ -36,6 +36,12 @@ then\n \ttest_done\n fi\n \n+if test -n \"$NO_EXPAT\" && test -n \"$LIB_HTTPD_DAV\"\n+then\n+\tskip_all='skipping test, git built without expat support'\n+\ttest_done\n+fi\n+\n test_tristate GIT_TEST_HTTPD\n if test \"$GIT_TEST_HTTPD\" = false\n then\n"},{"id":"260735","messageId":"20150507161311.GA26219@peff.net","threadId":"39260","inReplyTo":"xmqqzj5gqsnd.fsf_-_@gitster.dls.corp.google.com","subject":"Re: [PATCH] tests: skip dav http-push tests under NO_EXPAT=NoThanks","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-05-07T16:13:11Z","receivedAt":"2015-05-07T16:13:11Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 07, 2015 at 09:06:14AM -0700, Junio C Hamano wrote:\n\n> When built with NO_EXPAT=NoThanks, we will not have a working http-push\n> over webdav.\n\nHmph, I used to build with NO_EXPAT long ago and don't remember running\ninto this, but it is clearly broken now. I wonder what bizarre\ncombination of leftover build products made it work. ;)\n\n> diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\n> index 872a252..d823664 100644\n> --- a/t/lib-httpd.sh\n> +++ b/t/lib-httpd.sh\n> @@ -36,6 +36,12 @@ then\n>  \ttest_done\n>  fi\n>  \n> +if test -n \"$NO_EXPAT\" && test -n \"$LIB_HTTPD_DAV\"\n> +then\n> +\tskip_all='skipping test, git built without expat support'\n> +\ttest_done\n> +fi\n\nI was confused at first why this is in lib-httpd.sh and not 5540, but I\nsee LIB_HTTPD_DAV is provided by t5540 as a feature flag to\nlib-httpd.sh. I learn something new every day about our test\ninfrastructure.\n\n-Peff\n"}]}