X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ftest-lib.sh;h=e2b106cb6a2337f873a7225670392b376f74c6e7;hb=d5c527448db30be55553e0b125015e8d444f8dbc;hp=70ea7e089e21b1619d85b6ccfe9e70b8f11421ff;hpb=bfdbee98109c5ad2dbbc392e7eed1ae688acc039;p=git.git diff --git a/t/test-lib.sh b/t/test-lib.sh index 70ea7e089..e2b106cb6 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -449,6 +449,11 @@ test_done () { # we will leave things as they are. say_color pass "passed all $msg" + + test -d "$remove_trash" && + cd "$(dirname "$remove_trash")" && + rm -rf "$(basename "$remove_trash")" + exit 0 ;; *) @@ -485,7 +490,8 @@ fi . ../GIT-BUILD-OPTIONS # Test repository -test="trash directory" +test="trash directory.$(basename "$0" .sh)" +test ! -z "$debug" || remove_trash="$TEST_DIRECTORY/$test" rm -fr "$test" || { trap - exit echo >&5 "FATAL: Cannot prepare test area"