From: Johannes Schindelin Date: Thu, 21 Aug 2008 07:49:12 +0000 (+0200) Subject: test-lib: do not remove trash_directory if called with --debug X-Git-Tag: v1.6.1-rc1~318 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5a4a088add3bdcbe86ae7e87964ce4025ddbc389;p=git.git test-lib: do not remove trash_directory if called with --debug Sometimes you want to keep the trash directory, even if all tests passed. For example, when extending tests, it comes it quite handy. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/t/test-lib.sh b/t/test-lib.sh index 6212c46cc..e2b106cb6 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -491,7 +491,7 @@ fi # Test repository test="trash directory.$(basename "$0" .sh)" -remove_trash="$TEST_DIRECTORY/$test" +test ! -z "$debug" || remove_trash="$TEST_DIRECTORY/$test" rm -fr "$test" || { trap - exit echo >&5 "FATAL: Cannot prepare test area"