git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Johannes Sixt" <j6t@kdbg.org>
Subject: Re: [PATCH] test-lib: avoid full path to store test results
Date: Tue, 30 Oct 2012 00:28:50 -0400	[thread overview]
Message-ID: <20121030042850.GA23263@sigill.intra.peff.net> (raw)
In-Reply-To: <1351570377-894-1-git-send-email-felipe.contreras@gmail.com>

On Tue, Oct 30, 2012 at 05:12:57AM +0100, Felipe Contreras wrote:

> No reason to use the full path in case this is used externally.

I think it is not just "no reason to", but it is actively wrong to use a
full path, as we do not take care to "mkdir -p" the intervening path
components.

However, this never comes up in practice, because all of the test
scripts assume you are running them from the test directory (i.e.,
they will fail otherwise because they will not find ./test-lib.sh).

Is this in support of putting remote-hg tests in contrib/? I had
expected you to just put

  export TEST_DIRECTORY="$(pwd)/../../../t"
  . "$TEST_DIRECTORY/test-lib.sh"

into the test script in contrib/remote-hg/t. I guess you are doing
something like:

  cd ../../../t && ../contrib/remote-hg/t/twhatever...

but the former seems much simpler to invoke (and if the goal is to get
your test-results in the right place, setting TEST_OUTPUT_DIRECTORY is
the best way to do that).

If this is part of the remote-hg series, I'd prefer to just see it as
part of the re-roll. It's much easier to evaluate it in context.

Or are you really just doing:

  cd git/t
  $PWD/t0000-basic.sh

I guess there is nothing wrong with that, though there is no reason not
to use "./" instead of $PWD.

-Peff

  reply	other threads:[~2012-10-30  4:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30  4:12 [PATCH] test-lib: avoid full path to store test results Felipe Contreras
2012-10-30  4:28 ` Jeff King [this message]
2012-10-30  4:39   ` Felipe Contreras
2012-10-30  4:46 ` Jonathan Nieder
2012-10-30 16:02   ` Felipe Contreras
2012-10-31  1:27     ` Jonathan Nieder
2012-10-31  1:59       ` Felipe Contreras
2012-10-31  2:13         ` Jonathan Nieder
2012-10-31  2:28           ` Felipe Contreras
2012-10-31 18:02             ` Johannes Sixt
2012-10-31 18:28               ` Felipe Contreras
2012-11-02 13:17               ` Jeff King
2012-11-02 15:17                 ` Felipe Contreras
2012-11-02 15:20                   ` Jeff King
2012-10-30  6:58 ` Elia Pinto
2012-10-30  7:01   ` Jonathan Nieder
2012-10-30 22:17     ` Elia Pinto
2012-10-31  9:05       ` Stefano Lattarini

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=20121030042850.GA23263@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=jrnieder@gmail.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).