{"thread":{"id":"26158","subject":"[PATCH] t9001: Fix test prerequisites","startedAt":"2010-12-29T21:02:31Z","lastAt":"2010-12-29T21:38:54Z","messageCount":2,"participants":["Robin H. Johnson","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"158728","messageId":"1293656551-5463-1-git-send-email-robbat2@gentoo.org","threadId":"26158","inReplyTo":null,"subject":"[PATCH] t9001: Fix test prerequisites","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2010-12-29T21:02:31Z","receivedAt":"2010-12-29T21:02:31Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"Add in missing Perl prerequisites for new tests of send-email.\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n t/t9001-send-email.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 1dc4a92..3271426 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -1135,7 +1135,7 @@ test_expect_success $PREREQ '--8bit-encoding also treats subject' '\n # Note that the patches in this test are deliberately out of order; we\n # want to make sure it works even if the cover-letter is not in the\n # first mail.\n-test_expect_success 'refusing to send cover letter template' '\n+test_expect_success $PREREQ 'refusing to send cover letter template' '\n \tclean_fake_sendmail &&\n \trm -fr outdir &&\n \tgit format-patch --cover-letter -2 -o outdir &&\n@@ -1151,7 +1151,7 @@ test_expect_success 'refusing to send cover letter template' '\n \ttest -z \"$(ls msgtxt*)\"\n '\n \n-test_expect_success '--force sends cover letter template anyway' '\n+test_expect_success $PREREQ '--force sends cover letter template anyway' '\n \tclean_fake_sendmail &&\n \trm -fr outdir &&\n \tgit format-patch --cover-letter -2 -o outdir &&\n-- \n1.7.3.2\n"},{"id":"158730","messageId":"7vhbdws1ht.fsf@alter.siamese.dyndns.org","threadId":"26158","inReplyTo":"1293656551-5463-1-git-send-email-robbat2@gentoo.org","subject":"Re: [PATCH] t9001: Fix test prerequisites","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-12-29T21:38:54Z","receivedAt":"2010-12-29T21:38:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Robin H. Johnson\" <robbat2@gentoo.org> writes:\n\n> Add in missing Perl prerequisites for new tests of send-email.\n>\n> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>\n> ---\n>  t/t9001-send-email.sh |    4 ++--\n>  1 files changed, 2 insertions(+), 2 deletions(-)\n\nThanks.\n\n> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\n> index 1dc4a92..3271426 100755\n> --- a/t/t9001-send-email.sh\n> +++ b/t/t9001-send-email.sh\n> @@ -1135,7 +1135,7 @@ test_expect_success $PREREQ '--8bit-encoding also treats subject' '\n>  # Note that the patches in this test are deliberately out of order; we\n>  # want to make sure it works even if the cover-letter is not in the\n>  # first mail.\n> -test_expect_success 'refusing to send cover letter template' '\n> +test_expect_success $PREREQ 'refusing to send cover letter template' '\n>  \tclean_fake_sendmail &&\n>  \trm -fr outdir &&\n>  \tgit format-patch --cover-letter -2 -o outdir &&\n> @@ -1151,7 +1151,7 @@ test_expect_success 'refusing to send cover letter template' '\n>  \ttest -z \"$(ls msgtxt*)\"\n>  '\n>  \n> -test_expect_success '--force sends cover letter template anyway' '\n> +test_expect_success $PREREQ '--force sends cover letter template anyway' '\n>  \tclean_fake_sendmail &&\n>  \trm -fr outdir &&\n>  \tgit format-patch --cover-letter -2 -o outdir &&\n\nThis however makes me wonder (Robin, the following is primarily meant for\nÆvar to whom 57cd35e (t/t9001-send-email.sh: change from skip_all=* to\nprereq skip, 2010-08-13) is credited, and not a complaint to your patch at\nall, but you are welcome to comment on it if you feel like).\n\nEverything in this test seem to require $PREREQ now (test_expect_success\nalways takes the 3-parameter form).  Does it suggest that we might want to\nallow tests to define a \"global prerequisite\", e.g.\n\n   GIT_TESTS_PREREQ=\"PERL\"\n   export GIT_TESTS_PREREQ\n\nand make the traditional 2-parameter test_expect_success without an\nexplicit prerequisite take notice?  Would it let us not have to worry\nabout this kind of breakages?  Or is 9001 a very tiny minority oddball\nthat must have $PREREQ everywhere and such a test framework feature would\nbe an overkill?\n\nMore importantly, 9001 is all about send-email and we know upfront that we\nwant to skip everything when PERL prerequisite is not met.  Why not a\nsimple \n\n\tif ! test_have_prereq PERL\n        then\n        \ttest_done\n\tfi\n\ninsufficient?\n\nWho cares \"skipped statistics\"?  When one does not care about testing\nsend-email at all, why should one care how many tests on that program are\nskipped?  I personally do not think this is worth the trouble, and am very\nclose (showing two fingers almost touching) to suggest reverting 57cd35e.\n\nPlease convince me otherwise.\n"}]}