Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Thomas Rast <hidden>
Date: 2016-06-15 22:56:49

Jeff King [off-list ref] writes:
On Sun, Apr 14, 2013 at 05:34:56PM +0100, John Keeping wrote:
quoted
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 [off-list ref]
Indeed, your blame assignment seems correct :-)

Acked-by: Thomas Rast <redacted>
-- >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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help