{"thread":{"id":"14210","subject":"perl t9700 failures?","startedAt":"2008-06-29T19:52:00Z","lastAt":"2008-06-30T06:11:48Z","messageCount":9,"participants":["Linus Torvalds","Junio C Hamano","Jakub Narebski","Johannes Schindelin","Lea Wiemann","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"81660","messageId":"alpine.LFD.1.10.0806291241210.27776@hp.linux-foundation.org","threadId":"14210","inReplyTo":null,"subject":"perl t9700 failures?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-06-29T19:52:00Z","receivedAt":"2008-06-29T19:52:00Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\nAm I the only one who gets this error:\n\n\t*** t9700-perl-git.sh ***\n\t*   ok 1: set up test repository\n\t*  run 2: Perl API (perl ../t9700/test.pl)\n\t* FAIL 2: Perl API\n\t        perl ../t9700/test.pl\n\t* FAIL 3: no stderr: Perl API\n\t        perl ../t9700/test.pl\n\t* failed 2 among 3 test(s)\n\nwhich I have no idea about, since to me perl is a black box, and doing  \nrun of the tests with '-i -v' doesn't actually tell any more about which \npart of the perl script is failing, or why.. Trying to run the perl thing \nby hand, though, gives me this:\n\n\tCan't locate Test/More.pm in @INC (@INC contains: ...)\n\nwhich is presumably the problem. It looks like it is assuming I have the \nTest::More perl libs, which I presumably don't have, don't have any clue \nwhere they are, nor really any interest in installing.\n\nWouldn't it be a lot more polite to just not run the test when the \nTest::More stuff doesn't exist? Rather than failing the testsuite? From a \nquick \"git grep\", this test is the only one that uses Test::More..\n\n\t\tLinus\n"},{"id":"81665","messageId":"7v4p7c9erj.fsf@gitster.siamese.dyndns.org","threadId":"14210","inReplyTo":"alpine.LFD.1.10.0806291241210.27776@hp.linux-foundation.org","subject":"Re: perl t9700 failures?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-29T20:18:08Z","receivedAt":"2008-06-29T20:18:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> Am I the only one who gets this error:\n>\n> \t*** t9700-perl-git.sh ***\n> \t*   ok 1: set up test repository\n> \t*  run 2: Perl API (perl ../t9700/test.pl)\n> \t* FAIL 2: Perl API\n> \t        perl ../t9700/test.pl\n> \t* FAIL 3: no stderr: Perl API\n> \t        perl ../t9700/test.pl\n> \t* failed 2 among 3 test(s)\n>\n> which I have no idea about, since to me perl is a black box, and doing  \n> run of the tests with '-i -v' doesn't actually tell any more about which \n> part of the perl script is failing, or why.. Trying to run the perl thing \n> by hand, though, gives me this:\n>\n> \tCan't locate Test/More.pm in @INC (@INC contains: ...)\n>\n> which is presumably the problem. It looks like it is assuming I have the \n> Test::More perl libs, which I presumably don't have, don't have any clue \n> where they are, nor really any interest in installing.\n>\n> Wouldn't it be a lot more polite to just not run the test when the \n> Test::More stuff doesn't exist? Rather than failing the testsuite? From a \n> quick \"git grep\", this test is the only one that uses Test::More..\n\nHmm.  I was told that Test::More was part of the std Perl distribution\n(and my quick check showed I happened to have that installed on my boxes\neven though I do not use it myself and assumed it was there because the\nclaim is true).  Another test that does rely on more obscure Perl library\ndoes refrain from running when it is not available, though...\n\nPerlhaps something liek this should be sufficient.\n\ndiff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh\nindex b2fb9ec..9b57ad1 100755\n--- a/t/t9700-perl-git.sh\n+++ b/t/t9700-perl-git.sh\n@@ -6,6 +6,11 @@\n test_description='perl interface (Git.pm)'\n . ./test-lib.sh\n \n+perl -MTest::More -e 0 2>/dev/null || {\n+\tsay_color skip >&3 \"Perl Test::More not available, skipping test\"\n+\ttest_done\n+}\n+\n # set up test repository\n \n test_expect_success \\\n"},{"id":"81666","messageId":"7vzlp47zy8.fsf@gitster.siamese.dyndns.org","threadId":"14210","inReplyTo":"alpine.LFD.1.10.0806291241210.27776@hp.linux-foundation.org","subject":"Re: perl t9700 failures?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-29T20:23:27Z","receivedAt":"2008-06-29T20:23:27Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I'll commit this (which is simpler than \"Perlhaps this would suffice\"\npatch I sent earlier).  Thanks for noticing.\n\n-- >8 --\n[PATCH] t9700: skip when Test::More is not available\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t9700-perl-git.sh |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh\nindex b2fb9ec..5dd32f4 100755\n--- a/t/t9700-perl-git.sh\n+++ b/t/t9700-perl-git.sh\n@@ -6,6 +6,11 @@\n test_description='perl interface (Git.pm)'\n . ./test-lib.sh\n \n+perl -MTest::More -e 0 2>/dev/null || {\n+\tsay skip \"Perl Test::More unavailable, skipping test\"\n+\ttest_done\n+}\n+\n # set up test repository\n \n test_expect_success \\\n-- \n1.5.6.1.102.g8e69d\n"},{"id":"81669","messageId":"1214771560-14005-1-git-send-email-jnareb@gmail.com","threadId":"14210","inReplyTo":"alpine.LFD.1.10.0806291241210.27776@hp.linux-foundation.org","subject":"[PATCH] Skip Perl interface (Git.pm) tests if requirements not fullfilled","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-29T20:32:40Z","receivedAt":"2008-06-29T20:32:40Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Signed-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nLinus Torvalds wrote:\n\n> Wouldn't it be a lot more polite to just not run the test when the \n> Test::More stuff doesn't exist? Rather than failing the testsuite? From a \n> quick \"git grep\", this test is the only one that uses Test::More...\n\nWould this be enough?\n\n t/t9700-perl-git.sh |   12 ++++++++++++\n 1 files changed, 12 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh\nindex b2fb9ec..81ff84d 100755\n--- a/t/t9700-perl-git.sh\n+++ b/t/t9700-perl-git.sh\n@@ -6,6 +6,18 @@\n test_description='perl interface (Git.pm)'\n . ./test-lib.sh\n \n+perl -MTest::More -e '' >/dev/null 2>&1 || {\n+\ttest_expect_success 'skipping Git.pm tests, Test::More module not found' :\n+\ttest_done\n+\texit\n+}\n+\n+perl -e 'use 5.006002;' >/dev/null 2>&1 || {\n+\ttest_expect_success 'skipping Git.pm tests, Perl version too old' :\n+\ttest_done\n+\texit\n+}\n+\n # set up test repository\n \n test_expect_success \\\n-- \n1.5.6\n"},{"id":"81676","messageId":"alpine.DEB.1.00.0806292253050.9925@racer","threadId":"14210","inReplyTo":"alpine.LFD.1.10.0806291241210.27776@hp.linux-foundation.org","subject":"Re: perl t9700 failures?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-06-29T21:55:07Z","receivedAt":"2008-06-29T21:55:07Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 29 Jun 2008, Linus Torvalds wrote:\n\n> \tCan't locate Test/More.pm in @INC (@INC contains: ...)\n\nI cannot say that I am really surprised.  And given that I _actively_ \nwarned that something like this is prone to happen, I have to say that I \nam actually a little pleased, too, since it shows I am not actually a \ncomplete moron having warned, even if people laughed in my face because of \nmy concerns.\n\nCiao,\nDscho\n"},{"id":"81684","messageId":"m3zlp3hn19.fsf@localhost.localdomain","threadId":"14210","inReplyTo":"7vzlp47zy8.fsf@gitster.siamese.dyndns.org","subject":"Re: perl t9700 failures?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-29T22:53:31Z","receivedAt":"2008-06-29T22:53:31Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> +perl -MTest::More -e 0 2>/dev/null || {\n> +\tsay skip \"Perl Test::More unavailable, skipping test\"\n> +\ttest_done\n> +}\n> +\n\nI think it would be nice to have \"test_skip\" function in test-lib.sh;\na few tests beside this one (t9500 gitweb test, git-svn tests) have\nnot always filled requirements.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"81685","messageId":"4868130F.2080600@gmail.com","threadId":"14210","inReplyTo":"7vzlp47zy8.fsf@gitster.siamese.dyndns.org","subject":"Re: perl t9700 failures?","fromName":"Lea Wiemann","fromEmail":"lewiemann@gmail.com","sentAt":"2008-06-29T22:56:15Z","receivedAt":"2008-06-29T22:56:15Z","isPatch":false,"sender":{"key":"lewiemann@gmail.com","avatar":null},"body":"Junio C Hamano wrote:\n> +perl -MTest::More -e 0 2>/dev/null || {\n> +\tsay skip \"Perl Test::More unavailable, skipping test\"\n\nThat looks fine -- the git scripts that use Git.pm are still tested\nseparately, so even if this test is skipped, Git.pm can be assumed to\nnot be broken.\n\nJakub Narebski wrote:\n> +perl -MTest::More -e '' >/dev/null 2>&1 || {\n> [...]\n> +perl -e 'use 5.006002;' >/dev/null 2>&1 || {\n\nI don't think checking for 5.6.2 (which is the version in which\nTest::More was added) is actually necessary.  If someone installs\nTest::More on an older Perl version, we might as well run the tests --\napparently Git.pm works even with older versions, since\nt3701-add-interactive.sh seems to work fine for Linus.\n\nJohannes Schindelin wrote:\n> And given that I _actively_  warned [...] I\n> am actually a little pleased\n\nJohannes, I'd actually be a little pleased if you either\n\n- stop \"actively warning\" and start actively sending patches, or\n- spare the list (and in particular, my mailbox) your whining.\n\nTIA.\n"},{"id":"81692","messageId":"alpine.LFD.1.10.0806291806120.17544@hp.linux-foundation.org","threadId":"14210","inReplyTo":"7v4p7c9erj.fsf@gitster.siamese.dyndns.org","subject":"Re: perl t9700 failures?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-06-30T01:17:36Z","receivedAt":"2008-06-30T01:17:36Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sun, 29 Jun 2008, Junio C Hamano wrote:\n> \n> Perlhaps something liek this should be sufficient.\n\nWorks-for-me(tm)\n\n\t\tLinus\n"},{"id":"81717","messageId":"48687924.7020309@viscovery.net","threadId":"14210","inReplyTo":"7vzlp47zy8.fsf@gitster.siamese.dyndns.org","subject":"Re: perl t9700 failures?","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-06-30T06:11:48Z","receivedAt":"2008-06-30T06:11:48Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Junio C Hamano schrieb:\n> I'll commit this\n\n> +perl -MTest::More -e 0 2>/dev/null || {\n> +\tsay skip \"Perl Test::More unavailable, skipping test\"\n\nBut without the \"skip\", right? ;)\n\n-- Hannes\n"}]}