git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: "Marius Storm-Olsen" <mstormo_git@storm-olsen.com>
Subject: Re: (warning) Tonight's 'pu' may fail its tests
Date: Fri, 06 Feb 2009 03:32:11 -0800	[thread overview]
Message-ID: <7v3aer7qdg.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7v7i437rqk.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 06 Feb 2009 03:02:43 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> The frustrating thing is that
>
>     GIT_SKIP_TESTS='t[0-35-9]??? t4[01]??' \
>     GIT_TEST_OPTS='-i -v' \
>     make -j4 test
>
> fails very reliably with the above log, but:
>
>  (1) running the same "../../git-shortlog" in  "t/trash directory.t4203-mailmap/"
>      immediately after the test failed does emit the expected result;
>
>  (2) going down to t/ and manually running t4203-mailmap.sh alone succeeds;
>
>  (3) running the tests serially (i.e. without -j4) allows the test to succeed.

The test is broken and here is a fix I'll be squashing into the series.

The mystery was simply that it failed when the test was run in the
background (i.e. !isatty(0)) because it used "git shortlog" without saying
that it wants a shortlog from HEAD down to root explicitly.

 t/t4203-mailmap.sh |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git i/t/t4203-mailmap.sh w/t/t4203-mailmap.sh
index c7a1238..094d905 100755
--- i/t/t4203-mailmap.sh
+++ w/t/t4203-mailmap.sh
@@ -24,7 +24,7 @@ nick1 (1):
 EOF
 
 test_expect_success 'No mailmap' '
-	git shortlog >actual &&
+	git shortlog HEAD >actual &&
 	test_cmp expect actual
 '
 
@@ -39,7 +39,7 @@ EOF
 
 test_expect_success 'default .mailmap' '
 	echo "Repo Guy <author@example.com>" > .mailmap &&
-	git shortlog >actual &&
+	git shortlog HEAD >actual &&
 	test_cmp expect actual
 '
 
@@ -57,7 +57,7 @@ test_expect_success 'log.mailmap set' '
 	mkdir internal_mailmap &&
 	echo "Internal Guy <bugs@company.xx>" > internal_mailmap/.mailmap &&
 	git config log.mailmap internal_mailmap/.mailmap &&
-	git shortlog >actual &&
+	git shortlog HEAD >actual &&
 	test_cmp expect actual
 '
 
@@ -72,7 +72,7 @@ EOF
 test_expect_success 'log.mailmap override' '
 	echo "External Guy <author@example.com>" >> internal_mailmap/.mailmap &&
 	git config log.mailmap internal_mailmap/.mailmap &&
-	git shortlog >actual &&
+	git shortlog HEAD >actual &&
 	test_cmp expect actual
 '
 
@@ -88,7 +88,7 @@ EOF
 test_expect_success 'log.mailmap file non-existant' '
 	rm internal_mailmap/.mailmap &&
 	rmdir internal_mailmap &&
-	git shortlog >actual &&
+	git shortlog HEAD >actual &&
 	test_cmp expect actual
 '
 
@@ -102,7 +102,7 @@ nick1 (1):
 EOF
 test_expect_success 'No mailmap files, but configured' '
 	rm .mailmap &&
-	git shortlog >actual &&
+	git shortlog HEAD >actual &&
 	test_cmp expect actual
 '
 
@@ -162,7 +162,7 @@ test_expect_success 'Shortlog output (complex mapping)' '
 	echo "Santa Claus <santa.claus@northpole.xx> <me@company.xx>" >> internal_mailmap/.mailmap &&
 	echo "Santa Claus <santa.claus@northpole.xx> <me@company.xx>" >> internal_mailmap/.mailmap &&
 
-	git shortlog -e >actual &&
+	git shortlog -e HEAD >actual &&
 	test_cmp expect actual
 
 '

      reply	other threads:[~2009-02-06 11:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06 11:02 (warning) Tonight's 'pu' may fail its tests Junio C Hamano
2009-02-06 11:32 ` Junio C Hamano [this message]

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=7v3aer7qdg.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mstormo_git@storm-olsen.com \
    /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).