git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Christian Couder <chriscool@tuxfamily.org>,
	Ramkumar Ramachandra <artagnon@gmail.com>
Subject: Re: [PATCH 4/5] test: improve rebase -q test
Date: Tue, 28 May 2013 21:38:41 -0500	[thread overview]
Message-ID: <51a56a31947d6_807b33e1899765@nysa.mail> (raw)
In-Reply-To: <7vvc6311dr.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
> 
> > Let's show the output so it's clear why it failed.
> >
> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> > ---
> >  t/t3400-rebase.sh | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
> > index b58fa1a..fb39531 100755
> > --- a/t/t3400-rebase.sh
> > +++ b/t/t3400-rebase.sh
> > @@ -185,6 +185,7 @@ test_expect_success 'default to @{upstream} when upstream arg is missing' '
> >  test_expect_success 'rebase -q is quiet' '
> >  	git checkout -b quiet topic &&
> >  	git rebase -q master >output.out 2>&1 &&
> > +	cat output.out &&
> >  	test ! -s output.out
> >  '
> 
> It is one thing to avoid squelching output that naturally comes out
> of command being tested unnecessarily, so that "./txxxx-*.sh -v"
> output can be used for debugging.  I however am not sure if adding
> "cat" to random places like this is a productive direction for us to
> go in.
> 
> A more preferrable alternative may be adding something like this to
> test-lib.sh and call it from here and elsewhere (there are about 50
> places that do "test ! -s <filename>"), perhaps?
> 
>         test_must_be_an_empty_file () {
>                 if test -s "$1"
>                 then
>                         cat "$1"
>                         false
>                 fi
>         }

Perhaps, but I'm not interested. I'm tired of obvious fixes getting rejected
for hypothetical "ideal" situations that we'll never reach.

-- 
Felipe Contreras

  parent reply	other threads:[~2013-05-29  2:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28 12:54 [PATCH 0/5] Trivial patches Felipe Contreras
2013-05-28 12:54 ` [PATCH 1/5] remote: trivial style cleanup Felipe Contreras
2013-05-28 17:04   ` Junio C Hamano
2013-05-28 12:54 ` [PATCH 2/5] sequencer: trivial fix Felipe Contreras
2013-05-28 12:54 ` [PATCH 3/5] test: trivial cleanups Felipe Contreras
2013-05-28 12:54 ` [PATCH 4/5] test: improve rebase -q test Felipe Contreras
2013-05-28 17:05   ` Junio C Hamano
2013-05-28 17:19     ` Jonathan Nieder
2013-05-28 17:28       ` Junio C Hamano
2013-05-29  2:38     ` Felipe Contreras [this message]
2013-05-29 16:52       ` Junio C Hamano
2013-05-29 17:11         ` Felipe Contreras
2013-05-28 12:54 ` [PATCH 5/5] test: rebase: fix --interactive test Felipe Contreras

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51a56a31947d6_807b33e1899765@nysa.mail \
    --to=felipe.contreras@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=nhorman@tuxdriver.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).