* perl t9700 failures?
@ 2008-06-29 19:52 Linus Torvalds
2008-06-29 20:18 ` Junio C Hamano
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Linus Torvalds @ 2008-06-29 19:52 UTC (permalink / raw)
To: Git Mailing List, Junio C Hamano, Lea Wiemann
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..
Linus
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: perl t9700 failures?
2008-06-29 19:52 perl t9700 failures? Linus Torvalds
@ 2008-06-29 20:18 ` Junio C Hamano
2008-06-30 1:17 ` Linus Torvalds
2008-06-29 20:23 ` Junio C Hamano
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2008-06-29 20:18 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List, Lea Wiemann
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 \
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: perl t9700 failures?
2008-06-29 19:52 perl t9700 failures? Linus Torvalds
2008-06-29 20:18 ` Junio C Hamano
@ 2008-06-29 20:23 ` Junio C Hamano
2008-06-29 22:53 ` Jakub Narebski
` (2 more replies)
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
3 siblings, 3 replies; 9+ messages in thread
From: Junio C Hamano @ 2008-06-29 20:23 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List, Lea Wiemann
I'll commit this (which is simpler than "Perlhaps this would suffice"
patch I sent earlier). Thanks for noticing.
-- >8 --
[PATCH] t9700: skip when Test::More is not available
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t9700-perl-git.sh | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index b2fb9ec..5dd32f4 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 skip "Perl Test::More unavailable, skipping test"
+ test_done
+}
+
# set up test repository
test_expect_success \
--
1.5.6.1.102.g8e69d
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] Skip Perl interface (Git.pm) tests if requirements not fullfilled
2008-06-29 19:52 perl t9700 failures? Linus Torvalds
2008-06-29 20:18 ` Junio C Hamano
2008-06-29 20:23 ` Junio C Hamano
@ 2008-06-29 20:32 ` Jakub Narebski
2008-06-29 21:55 ` perl t9700 failures? Johannes Schindelin
3 siblings, 0 replies; 9+ messages in thread
From: Jakub Narebski @ 2008-06-29 20:32 UTC (permalink / raw)
To: git; +Cc: Linus Torvalds, Lea Wiemann, Jakub Narebski
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Linus Torvalds wrote:
> 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...
Would this be enough?
t/t9700-perl-git.sh | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index b2fb9ec..81ff84d 100755
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
@@ -6,6 +6,18 @@
test_description='perl interface (Git.pm)'
. ./test-lib.sh
+perl -MTest::More -e '' >/dev/null 2>&1 || {
+ test_expect_success 'skipping Git.pm tests, Test::More module not found' :
+ test_done
+ exit
+}
+
+perl -e 'use 5.006002;' >/dev/null 2>&1 || {
+ test_expect_success 'skipping Git.pm tests, Perl version too old' :
+ test_done
+ exit
+}
+
# set up test repository
test_expect_success \
--
1.5.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: perl t9700 failures?
2008-06-29 19:52 perl t9700 failures? Linus Torvalds
` (2 preceding siblings ...)
2008-06-29 20:32 ` [PATCH] Skip Perl interface (Git.pm) tests if requirements not fullfilled Jakub Narebski
@ 2008-06-29 21:55 ` Johannes Schindelin
3 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2008-06-29 21:55 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List, Junio C Hamano, Lea Wiemann
Hi,
On Sun, 29 Jun 2008, Linus Torvalds wrote:
> Can't locate Test/More.pm in @INC (@INC contains: ...)
I cannot say that I am really surprised. And given that I _actively_
warned that something like this is prone to happen, I have to say that I
am actually a little pleased, too, since it shows I am not actually a
complete moron having warned, even if people laughed in my face because of
my concerns.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: perl t9700 failures?
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
2 siblings, 0 replies; 9+ messages in thread
From: Jakub Narebski @ 2008-06-29 22:53 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Linus Torvalds, Git Mailing List, Lea Wiemann
Junio C Hamano <gitster@pobox.com> writes:
> +perl -MTest::More -e 0 2>/dev/null || {
> + say skip "Perl Test::More unavailable, skipping test"
> + test_done
> +}
> +
I think it would be nice to have "test_skip" function in test-lib.sh;
a few tests beside this one (t9500 gitweb test, git-svn tests) have
not always filled requirements.
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: perl t9700 failures?
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
2 siblings, 0 replies; 9+ messages in thread
From: Lea Wiemann @ 2008-06-29 22:56 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Linus Torvalds, Git Mailing List
Junio C Hamano wrote:
> +perl -MTest::More -e 0 2>/dev/null || {
> + say skip "Perl Test::More unavailable, skipping test"
That looks fine -- the git scripts that use Git.pm are still tested
separately, so even if this test is skipped, Git.pm can be assumed to
not be broken.
Jakub Narebski wrote:
> +perl -MTest::More -e '' >/dev/null 2>&1 || {
> [...]
> +perl -e 'use 5.006002;' >/dev/null 2>&1 || {
I don't think checking for 5.6.2 (which is the version in which
Test::More was added) is actually necessary. If someone installs
Test::More on an older Perl version, we might as well run the tests --
apparently Git.pm works even with older versions, since
t3701-add-interactive.sh seems to work fine for Linus.
Johannes Schindelin wrote:
> And given that I _actively_ warned [...] I
> am actually a little pleased
Johannes, I'd actually be a little pleased if you either
- stop "actively warning" and start actively sending patches, or
- spare the list (and in particular, my mailbox) your whining.
TIA.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: perl t9700 failures?
2008-06-29 20:18 ` Junio C Hamano
@ 2008-06-30 1:17 ` Linus Torvalds
0 siblings, 0 replies; 9+ messages in thread
From: Linus Torvalds @ 2008-06-30 1:17 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List, Lea Wiemann
On Sun, 29 Jun 2008, Junio C Hamano wrote:
>
> Perlhaps something liek this should be sufficient.
Works-for-me(tm)
Linus
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: perl t9700 failures?
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
2 siblings, 0 replies; 9+ messages in thread
From: Johannes Sixt @ 2008-06-30 6:11 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Linus Torvalds, Git Mailing List, Lea Wiemann
Junio C Hamano schrieb:
> I'll commit this
> +perl -MTest::More -e 0 2>/dev/null || {
> + say skip "Perl Test::More unavailable, skipping test"
But without the "skip", right? ;)
-- Hannes
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-06-30 6:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-29 19:52 perl t9700 failures? Linus Torvalds
2008-06-29 20:18 ` Junio C Hamano
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
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).