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

Re: [PATCH] t/test-lib.sh: fix TRASH_DIRECTORY handling

From
Thomas Rast <trast@inf.ethz.ch>
Date
Apr 14, 2013, 19:44 UTC
Message-ID
<87d2twzyl7.fsf@hexa.v.cablecom.net>
In-Reply-To
<20130414193821.GC4599@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 20 quoted lines
> On Sun, Apr 14, 2013 at 05:34:56PM +0100, John Keeping wrote:
>
>> After the location of $TRASH_DIRECTORY is adjusted by
>> $TEST_OUTPUT_DIRECTORY, we go on to use the $test variable to make the
>> trash directory and cd into it.  This means that when
>> $TEST_OUTPUT_DIRECTORY is not "." and an absolute --root has not been
>> specified, we do not remove the trash directory once the tests are
>> complete (remove_trash is set to $TRASH_DIRECTORY).
>> 
>> Fix this by always referring to the trash directory as $TRASH_DIRECTORY.
>
> Thanks, this seems to date back all the way to my f423ef5 (tests: allow
> user to specify trash directory location, 2009-08-09), although I think
> at that time it was not even possible to run the tests from any other
> directory. So I am happy to blame Thomas's later patches for violating
> my assumptions. :)
>
> Definitely:
>
>   Acked-by: Jeff King <peff@peff.net>
Indeed, your blame assignment seems correct :-)
Acked-by: Thomas Rast <trast@inf.ethz.ch>
Show 9 quoted lines
> -- >8 --
> Subject: [PATCH] t/test-lib.sh: drop "$test" variable
>
> The $test variable is used as an interim buffer for
> constructing $TRASH_DIRECTORY, and is almost compatible with
> it (the exception being that $test has not been converted to
> an absolute path). Let's get rid of it entirely so that
> later code does not accidentally use it, thinking the two
> are interchangeable.
Agreed.
-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Jeff King
Message 3 of 3 in “t/test-lib.sh: fix TRASH_DIRECTORY handling”
  1. t/test-lib.sh: fix TRASH_DIRECTORY handlingJohn Keeping, Apr 14, 2013
  2. Jeff KingApr 14, 2013
  3. Thomas RastApr 14, 2013

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.