Re: Test 9500 - unhelpful without Perl::CGI

Subsystems: the rest

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Test 9500 - unhelpful without Perl::CGI

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:28

Linus Torvalds [off-list ref] writes:
This has probably been going on forever, and the only reason I noticed
is that I had a machine that doesn't have perl-CGI installed.

I'm talking about t9500-gitweb-standalone-no-errors.

Anyway, if you don't have that, the test fails at everything, and it
does so without any clues about _why_ it fails.
Something like this would hopefully suffice.

It seems that we do test for the version of Encode, but we do not
specifically test CGI or other modules that people do not have to slurp
from CPAN?

 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

Re: Test 9500 - unhelpful without Perl::CGI

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:51:28

Heya,

On Wed, Jun 15, 2011 at 07:59, Junio C Hamano [off-list ref] wrote:
+perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {
+       skip_all='skipping gitweb tests, CGI module unusable'
+       test_done
+}
+
Isn't the new style to use test_must_succeed CGI_AVAILABLE '...' '...'
rather than skip_all+test_done?

-- 
Cheers,

Sverre Rabbelier
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help