Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: Test 9500 - unhelpful without Perl::CGI

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:29
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Junio C Hamano [off-list ref] writes:
Sverre Rabbelier [off-list ref] writes:
quoted
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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help