From: "Philippe Bruhat (BooK)" <philippe.bruhat@free.fr>
To: Jeff King <peff@peff.net>
Cc: "Philippe Bruhat (BooK)" <book@cpan.org>, git@vger.kernel.org
Subject: Re: [PATCH] Define $PERL_PATH in test-lib.sh
Date: Tue, 10 Nov 2009 14:33:34 +0100 [thread overview]
Message-ID: <20091110133334.GB8896@plop> (raw)
In-Reply-To: <20091110122315.GA15906@coredump.intra.peff.net>
On Tue, Nov 10, 2009 at 07:23:15AM -0500, Jeff King wrote:
> On Tue, Nov 10, 2009 at 11:46:51AM +0100, Philippe Bruhat (BooK) wrote:
>
> > The main Makefile defines PERL_PATH as the perl to use in the shebang
> > line of git*.perl commands. This ensures this will be the perl used
> > to run the tests (in case another perl appears in $PATH before the one
> > defined in $PERL_PATH)
PERL_PATH is a variable in the Makefile that, if not defined is set up
to /usr/bin/perl.
It is used to set the shebang line in the git-* perl scripts.
> I think this "the perl used to run the tests" needs to be clarified in
> the commit message. There are really three ways we use perl in the
> tests:
>
> 1. To run to the git-* scripts themselves.
Yes, this PERL_PATH.
> 2. To run a test snippet of perl as if we were a git-* script.
Actually, my goal was to run Makefile.PL with the proper perl (see below).
> 3. To run random perl helper functions.
I didn't replace those ones, because any perl is good enough to do some
perl -i.bak -pe 's/foo/bar/' processing.
> We already use PERL_PATH for (1). I don't think there is much point in
> worrying about (3). If the perl in your PATH is so broken that it can't
> be used for simple helpers, then you should fix your PATH.
The Perl in my PATH doesn't have Error.pm installed, but /usr/bin/perl
has it. When the Makefile.PL is run by /usr/bin/perl, the private-Error.pm
module is not copied in blib. The git-* perl scripts are using the perl
in PERL_PATH, and therefore can't load Error.pm (not in blib during make test),
causing test breakage.
This is the original reason for this patch. I fixed the general (2) case,
deliberately avoiding to replace every call to perl (3).
> Your patch seems to just fix (2), which I think is sane. But I wanted to
> note it, because when I read your commit message, I wasn't sure which
> you were doing.
Yes.
--
Philippe Bruhat (BooK)
Trust only in incompetence. You will never be disappointed.
(Moral from Groo The Wanderer #16 (Epic))
next prev parent reply other threads:[~2009-11-10 13:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 10:46 [PATCH] Define $PERL_PATH in test-lib.sh Philippe Bruhat (BooK)
2009-11-10 12:23 ` Jeff King
2009-11-10 13:33 ` Philippe Bruhat (BooK) [this message]
2009-11-15 9:12 ` Junio C Hamano
2009-11-16 23:48 ` Philippe Bruhat (BooK)
2009-11-16 23:53 ` [PATCH] Make sure $PERL_PATH is defined when the test suite is run Philippe Bruhat (BooK)
2009-11-17 0:10 ` Junio C Hamano
2009-11-17 0:17 ` Philippe Bruhat (BooK)
2009-11-17 0:20 ` Philippe Bruhat (BooK)
2009-11-17 8:30 ` Johannes Sixt
2009-11-17 8:35 ` Philippe Bruhat (BooK)
2009-11-17 18:25 ` Junio C Hamano
2009-11-17 8:42 ` Philippe Bruhat (BooK)
2009-11-10 12:26 ` [PATCH] Define $PERL_PATH in test-lib.sh Johannes Sixt
2009-11-10 13:34 ` Philippe Bruhat (BooK)
2009-11-10 20:17 ` Junio C Hamano
2009-11-11 8:40 ` Philippe Bruhat (BooK)
2009-11-11 8:43 ` Jeff King
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=20091110133334.GB8896@plop \
--to=philippe.bruhat@free.fr \
--cc=book@cpan.org \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.