Re: [RFC] Support TEST_GIT_PATH variable for the path for the git to test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Barkalow <barkalow@xxxxxxxxxxxx> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux