Re: [RFC] Support TEST_GIT_PATH variable for the path for the git to test
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 26, 2008, 20:22 UTC
- Message-ID
- <7vpruj4ge1.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.LNX.1.00.0802261350510.19024@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 10 quoted lines
>> 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".
Show 13 quoted lines
>> > 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
$ ^DShow 6 quoted lines
> 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.