{"thread":{"id":"27626","subject":"Test 9500 - unhelpful without Perl::CGI","startedAt":"2011-06-15T02:37:15Z","lastAt":"2011-06-15T18:36:23Z","messageCount":6,"participants":["Linus Torvalds","Junio C Hamano","Sverre Rabbelier"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"170039","messageId":"BANLkTikj0GQCN94PvZz6n6fJJb5sHMApig@mail.gmail.com","threadId":"27626","inReplyTo":null,"subject":"Test 9500 - unhelpful without Perl::CGI","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2011-06-15T02:37:15Z","receivedAt":"2011-06-15T02:37:15Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"This has probably been going on forever, and the only reason I noticed\nis that I had a machine that doesn't have perl-CGI installed.\n\nI'm talking about t9500-gitweb-standalone-no-errors.\n\nAnyway, if you don't have that, the test fails at everything, and it\ndoes so without any clues about _why_ it fails. I ended up figuring it\nout by doing a \"strace -f\" to see what seems to be wrong.\n\nMaybe that test could have some additional check for \"is perl::CGI\ninstalled at all\" and at least give a useful error message rather than\njust saying it failed?\n\n                    Linus\n"},{"id":"170040","messageId":"7vmxhjk539.fsf@alter.siamese.dyndns.org","threadId":"27626","inReplyTo":"BANLkTikj0GQCN94PvZz6n6fJJb5sHMApig@mail.gmail.com","subject":"Re: Test 9500 - unhelpful without Perl::CGI","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-06-15T05:59:22Z","receivedAt":"2011-06-15T05:59:22Z","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> This has probably been going on forever, and the only reason I noticed\n> is that I had a machine that doesn't have perl-CGI installed.\n>\n> I'm talking about t9500-gitweb-standalone-no-errors.\n>\n> Anyway, if you don't have that, the test fails at everything, and it\n> does so without any clues about _why_ it fails.\n\nSomething like this would hopefully suffice.\n\nIt seems that we do test for the version of Encode, but we do not\nspecifically test CGI or other modules that people do not have to slurp\nfrom CPAN?\n\n t/gitweb-lib.sh |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh\nindex 143eb1f..292753f 100644\n--- a/t/gitweb-lib.sh\n+++ b/t/gitweb-lib.sh\n@@ -107,4 +107,9 @@ perl -MEncode -e '$e=\"\";decode_utf8($e, Encode::FB_CROAK)' >/dev/null 2>&1 || {\n \ttest_done\n }\n \n+perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {\n+\tskip_all='skipping gitweb tests, CGI module unusable'\n+\ttest_done\n+}\n+\n gitweb_init\n"},{"id":"170042","messageId":"BANLkTinAfqysABm+t_NkOGO2U+iy57WbVQ@mail.gmail.com","threadId":"27626","inReplyTo":"7vmxhjk539.fsf@alter.siamese.dyndns.org","subject":"Re: Test 9500 - unhelpful without Perl::CGI","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2011-06-15T07:26:03Z","receivedAt":"2011-06-15T07:26:03Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Wed, Jun 15, 2011 at 07:59, Junio C Hamano <gitster@pobox.com> wrote:\n> +perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {\n> +       skip_all='skipping gitweb tests, CGI module unusable'\n> +       test_done\n> +}\n> +\n\nIsn't the new style to use test_must_succeed CGI_AVAILABLE '...' '...'\nrather than skip_all+test_done?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"170073","messageId":"7vips7jaws.fsf@alter.siamese.dyndns.org","threadId":"27626","inReplyTo":"BANLkTinAfqysABm+t_NkOGO2U+iy57WbVQ@mail.gmail.com","subject":"Re: Test 9500 - unhelpful without Perl::CGI","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-06-15T16:51:15Z","receivedAt":"2011-06-15T16:51:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sverre Rabbelier <srabbelier@gmail.com> writes:\n\n> On Wed, Jun 15, 2011 at 07:59, Junio C Hamano <gitster@pobox.com> wrote:\n>> +perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {\n>> +       skip_all='skipping gitweb tests, CGI module unusable'\n>> +       test_done\n>> +}\n>> +\n>\n> Isn't the new style to use test_must_succeed CGI_AVAILABLE '...' '...'\n> rather than skip_all+test_done?\n\nI do not think that adds any value, at least in this case.  Besides, look\nat the context line above what you quoted ;-)\n"},{"id":"170074","messageId":"7vei2vja8q.fsf@alter.siamese.dyndns.org","threadId":"27626","inReplyTo":"7vips7jaws.fsf@alter.siamese.dyndns.org","subject":"Re: Test 9500 - unhelpful without Perl::CGI","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-06-15T17:05:41Z","receivedAt":"2011-06-15T17:05:41Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Sverre Rabbelier <srabbelier@gmail.com> writes:\n>\n>> Isn't the new style to use test_must_succeed CGI_AVAILABLE '...' '...'\n>> rather than skip_all+test_done?\n>\n> I do not think that adds any value, at least in this case.  Besides, look\n> at the context line above what you quoted ;-)\n\nIn any case, I'd justify it like this and queue.  Thanks for noticing.\n\n-- >8 --\nSubject: [PATCH] t/gitweb-lib.sh: skip gitweb tests when perl dependencies are not met\n\nLinus noticed that we go ahead testing gitweb and fail miserably on a\nbox with Perl but not perl-CGI library. We already have a code to detect\nlack of Perl and refrain from testing gitweb in t/gitweb-lib.sh (by the\nway, shouldn't it be called t/lib-gitweb.sh?), so let's extend it\nto cover this case as well.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/gitweb-lib.sh |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh\nindex 143eb1f..292753f 100644\n--- a/t/gitweb-lib.sh\n+++ b/t/gitweb-lib.sh\n@@ -107,4 +107,9 @@ perl -MEncode -e '$e=\"\";decode_utf8($e, Encode::FB_CROAK)' >/dev/null 2>&1 || {\n \ttest_done\n }\n \n+perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {\n+\tskip_all='skipping gitweb tests, CGI module unusable'\n+\ttest_done\n+}\n+\n gitweb_init\n-- \n1.7.6.rc1.119.g85fc2\n"},{"id":"170078","messageId":"BANLkTineU1x8NDk7Q5eUN3rkg0=yPH2k=w@mail.gmail.com","threadId":"27626","inReplyTo":"7vei2vja8q.fsf@alter.siamese.dyndns.org","subject":"Re: Test 9500 - unhelpful without Perl::CGI","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2011-06-15T18:36:23Z","receivedAt":"2011-06-15T18:36:23Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"On Wed, Jun 15, 2011 at 10:05 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Subject: [PATCH] t/gitweb-lib.sh: skip gitweb tests when perl dependencies are not met\n\nLooks good. This makes t9500 go from\n\n   not ok - 1 no commits: projects_list (implicit)\n   #\tgitweb_run\n   not ok - 2 no commits: projects_index\n   #\tgitweb_run \"a=project_index\"\n   not ok - 3 no commits: .git summary (implicit)\n   #\tgitweb_run \"p=.git\"\n   not ok - 4 no commits: .git commit (implicit HEAD)\n   ...\n   not ok - 98 categories: projects list, only default category\n   #\techo \"\\$projects_list_group_categories = 1;\" >>gitweb_config.perl &&\n   #\t\t gitweb_run\n   # failed 91 among 98 test(s)\n   1..98\n\nto\n\n  # passed all 0 test(s)\n  1..0 # SKIP skipping gitweb tests, CGI module unusable\n\nwithout perl-CGI installed. And with perl-CGI installed I obviously get\n\n   ...\n   ok 97 - ctags: malformed tag weights\n   ok 98 - categories: projects list, only default category\n   # passed all 98 test(s)\n   1..98\n\nSo Ack on that patch.\n\n   Thanks,\n                           Linus\n"}]}