git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Test 9500 - unhelpful without Perl::CGI

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 15, 2011, 17:05 UTC
Message-ID
<7vei2vja8q.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vips7jaws.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> Sverre Rabbelier <srabbelier@gmail.com> writes:
>
>> Isn't the new style to use test_must_succeed CGI_AVAILABLE '...' '...'
>> rather than skip_all+test_done?
>
> I do not think that adds any value, at least in this case.  Besides, look
> at the context line above what you quoted ;-)
In any case, I'd justify it like this and queue.  Thanks for noticing.
-- >8 --
Subject: [PATCH] t/gitweb-lib.sh: skip gitweb tests when perl dependencies are not met

Linus noticed that we go ahead testing gitweb and fail miserably on a box with Perl but not perl-CGI library. We already have a code to detect lack of Perl and refrain from testing gitweb in t/gitweb-lib.sh (by the way, shouldn't it be called t/lib-gitweb.sh?), so let's extend it to cover this case as well.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/gitweb-lib.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh
index 143eb1f..292753f 100644
--- a/t/gitweb-lib.sh
+++ b/t/gitweb-lib.sh
@@ -107,4 +107,9 @@ perl -MEncode -e '$e="";decode_utf8($e, Encode::FB_CROAK)' >/dev/null 2>&1 || {
 	test_done
 }
 
+perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {
+	skip_all='skipping gitweb tests, CGI module unusable'
+	test_done
+}
+
 gitweb_init
-- 
1.7.6.rc1.119.g85fc2
Previous: Junio C HamanoNext: Linus Torvalds
Message 5 of 6 in “Test 9500 - unhelpful without Perl::CGI”
  1. Linus TorvaldsJun 15, 2011
  2. Junio C HamanoJun 15, 2011
  3. Sverre RabbelierJun 15, 2011
  4. Junio C HamanoJun 15, 2011
  5. Junio C HamanoJun 15, 2011
  6. Linus TorvaldsJun 15, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.