提交 a0ab83eb 编写于 作者: J Junio C Hamano

Merge branch 'dt/gc-ignore-old-gc-logs'

Attempt to allow us notice "fishy" situation where we fail to
remove the temporary directory used during the test.

* dt/gc-ignore-old-gc-logs:
  test-lib: retire $remove_trash variable
  test-lib.sh: do not barf under --debug at the end of the test
  test-lib: abort when can't remove trash directory
......@@ -761,10 +761,15 @@ test_done () {
say "1..$test_count$skip_all"
fi
test -d "$remove_trash" &&
cd "$(dirname "$remove_trash")" &&
rm -rf "$(basename "$remove_trash")"
if test -z "$debug"
then
test -d "$TRASH_DIRECTORY" ||
error "Tests passed but trash directory already removed before test cleanup; aborting"
cd "$TRASH_DIRECTORY/.." &&
rm -fr "$TRASH_DIRECTORY" ||
error "Tests passed but test cleanup failed; aborting"
fi
test_at_end_hook_
exit 0 ;;
......@@ -919,7 +924,6 @@ case "$TRASH_DIRECTORY" in
/*) ;; # absolute path is good
*) TRASH_DIRECTORY="$TEST_OUTPUT_DIRECTORY/$TRASH_DIRECTORY" ;;
esac
test ! -z "$debug" || remove_trash=$TRASH_DIRECTORY
rm -fr "$TRASH_DIRECTORY" || {
GIT_EXIT_OK=t
echo >&5 "FATAL: Cannot prepare test area"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册