git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Support TEST_GIT_PATH variable for the path for the git to test
Date: Tue, 26 Feb 2008 12:22:30 -0800	[thread overview]
Message-ID: <7vpruj4ge1.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LNX.1.00.0802261350510.19024@iabervon.org> (Daniel Barkalow's message of "Tue, 26 Feb 2008 14:16:13 -0500 (EST)")

Daniel Barkalow <barkalow@iabervon.org> writes:

>> I did not mean to imply I was presenting the whole solution; I
>> was trying to hint at a different direction which may or may not
>> work.  I did not look at what test_create_repo() actually did
>> when I wrote the message, but you are right.  It too needs to
>> be made conditional, and when trying an installed version, it
>> should not do the "template" dance but let the installed "git init"
>> figure it out.
>
> Does it need to be conditional, or is simply "git init" right (where we've 
> already set environment variables for the local stuff if applicable)?

I suspect "uninstalled" cases (both "here" and "elsewhere")
needs to do the template magic, while "installed" case should be
just "git init".

>> > There's additionally the problem that things which are built for testing 
>> > in the git directory won't be installed anywhere.
>> 
>> To test without installing, in order to make them call out their
>> siblings, I have this piece that I source to a new shell:
>> 
>>         GIT_EXEC_PATH=`pwd`
>>         PATH=`pwd`:/usr/bin:/bin
>>         GITPERLLIB=`pwd`/perl/blib/lib
>>         export GIT_EXEC_PATH PATH GITPERLLIB
>
> Might be nice to have a "sgitpath" (on the model of sg or su) in t/, since 
> this is handy in general.

I have them in ./+denv and after building if I want to see it
work in real repo elsewhere I do:

	: gitster; sh
        $ . ./+denv
        $ cd ../elsewhere.git
        $ do the real workload trial
        $ ^D

> You understood correctly the first time; I was unclear the second time. 
> The problem here is that, in order to run tests, we call 
> "test-absolute-path", "test-genrandom", etc., and we can't use these from 
> the user's $PATH because, being only for testing, they don't get installed 
> there. We need to get git-remote (for example) from $PATH, but 
> test-genrandom from $(pwd)/.. in order to make the tests run.

Ok, so even "installed" case need to rely on "test-blah" we build.

> That sounds good (although only (2) is on my current path), but I also 
> need a prerequisite patch for both, I believe, for simply making test 
> helpers available independant of actual build products.

Yeah, sounds like it.

  reply	other threads:[~2008-02-26 20:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-25 23:21 [RFC] Support TEST_GIT_PATH variable for the path for the git to test Daniel Barkalow
2008-02-26  0:00 ` Junio C Hamano
2008-02-26 18:02   ` Daniel Barkalow
2008-02-26 18:46     ` Junio C Hamano
2008-02-26 19:16       ` Daniel Barkalow
2008-02-26 20:22         ` Junio C Hamano [this message]
2008-02-26 20:46           ` Daniel Barkalow
2008-02-26 21:01             ` Junio C Hamano

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=7vpruj4ge1.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    /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).