git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Allow Overriding GIT_BUILD_DIR

From
Thomas Rast <trast@inf.ethz.ch>
Date
Mar 2, 2012, 09:25 UTC
Message-ID
<87hay7e4mm.fsf@thomas.inf.ethz.ch>
In-Reply-To
<87fwdrk6d4.fsf@smith.obbligato.org>
greened@obbligato.org (David A. Greene) writes:
Show 18 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> We use it to find where the test-lib.sh and other lib-*.sh helper
>> definitions are, also we use it to find large-ish test vectors like
>> t3900/ and t4013/.  If an external test script t1234-git-subtree.sh
>> wants to use a separate file to keep its own helper definitions, how
>> should it name it?  It cannot be relative to TEST_DIRECTORY that is
>> typically "t/".  It cannot be relative to "../" as TRASH_DIRECTORY
>> where the script runs, as the --root option may move it elsewhere on
>> the filesystem (and is the reason TEST_DIRECTORY variable exists in
>> the first place).
>
> I must admit I am still confused about what these variables do even
> after reading this explanation several times.  I have a pretty good
> idea what TRASH_DIRECTORY is.
>
>> And how well does an external test script work with the --root option that
>> moves the TEST_DIRECTORY?
I think Junio meant TRASH_DIRECTORY here, too.
> I have no idea.  I didn't even know about --root and I still don't know
> what it does.  It would be helpful to have some commentary about
> options.

--root tells the tests where to put its TRASH_DIRECTORY and is frequently used to place it on a tmpfs (such as /dev/shm) as that gives the tests a *huge* speed boost.

That is, if I say
  ./t5510-fetch.sh --root=/dev/shm
then the "main test repo" aka TRASH_DIRECTORY is
  /dev/shm/trash directory.t5510-fetch
-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: David A. Greene
Message 4 of 4 in “Allow Overriding GIT_BUILD_DIR”
  1. Allow Overriding GIT_BUILD_DIRDavid A. Greene, Feb 5, 2012
  2. Junio C HamanoFeb 26, 2012
  3. David A. GreeneMar 2, 2012
  4. Thomas RastMar 2, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.