From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Git Mailing List <git@vger.kernel.org>,
Lea Wiemann <LeWiemann@gmail.com>
Subject: Re: perl t9700 failures?
Date: Sun, 29 Jun 2008 13:18:08 -0700 [thread overview]
Message-ID: <7v4p7c9erj.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0806291241210.27776@hp.linux-foundation.org> (Linus Torvalds's message of "Sun, 29 Jun 2008 12:52:00 -0700 (PDT)")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> Am I the only one who gets this error:
>
> *** t9700-perl-git.sh ***
> * ok 1: set up test repository
> * run 2: Perl API (perl ../t9700/test.pl)
> * FAIL 2: Perl API
> perl ../t9700/test.pl
> * FAIL 3: no stderr: Perl API
> perl ../t9700/test.pl
> * failed 2 among 3 test(s)
>
> which I have no idea about, since to me perl is a black box, and doing
> run of the tests with '-i -v' doesn't actually tell any more about which
> part of the perl script is failing, or why.. Trying to run the perl thing
> by hand, though, gives me this:
>
> Can't locate Test/More.pm in @INC (@INC contains: ...)
>
> which is presumably the problem. It looks like it is assuming I have the
> Test::More perl libs, which I presumably don't have, don't have any clue
> where they are, nor really any interest in installing.
>
> Wouldn't it be a lot more polite to just not run the test when the
> Test::More stuff doesn't exist? Rather than failing the testsuite? From a
> quick "git grep", this test is the only one that uses Test::More..
Hmm. I was told that Test::More was part of the std Perl distribution
(and my quick check showed I happened to have that installed on my boxes
even though I do not use it myself and assumed it was there because the
claim is true). Another test that does rely on more obscure Perl library
does refrain from running when it is not available, though...
Perlhaps something liek this should be sufficient.
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index b2fb9ec..9b57ad1 100755
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
@@ -6,6 +6,11 @@
test_description='perl interface (Git.pm)'
. ./test-lib.sh
+perl -MTest::More -e 0 2>/dev/null || {
+ say_color skip >&3 "Perl Test::More not available, skipping test"
+ test_done
+}
+
# set up test repository
test_expect_success \
next prev parent reply other threads:[~2008-06-29 20:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-29 19:52 perl t9700 failures? Linus Torvalds
2008-06-29 20:18 ` Junio C Hamano [this message]
2008-06-30 1:17 ` Linus Torvalds
2008-06-29 20:23 ` Junio C Hamano
2008-06-29 22:53 ` Jakub Narebski
2008-06-29 22:56 ` Lea Wiemann
2008-06-30 6:11 ` Johannes Sixt
2008-06-29 20:32 ` [PATCH] Skip Perl interface (Git.pm) tests if requirements not fullfilled Jakub Narebski
2008-06-29 21:55 ` perl t9700 failures? Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v4p7c9erj.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=LeWiemann@gmail.com \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).