summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 29dc133)
raw | patch | inline | side by side (parent: 29dc133)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Mar 2008 04:58:01 +0000 (21:58 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Mar 2008 05:17:22 +0000 (22:17 -0700) |
When your test creates an unwritable directory that test framework cannot
clean out by "rm -fr trash", later tests cannot start in a fresh state
they expect to. Detect this and error out early.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
clean out by "rm -fr trash", later tests cannot start in a fresh state
they expect to. Detect this and error out early.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh | patch | blob | history |
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 268b26c959692f8f575fb088143a92c4785b1214..870b255f13e1b2d971b7e036d130d35387e3c2c7 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
# Test repository
test=trash
-rm -fr "$test"
+rm -fr "$test" || {
+ trap - exit
+ echo >&5 "FATAL: Cannot prepare test area"
+ exit 1
+}
+
test_create_repo $test
cd "$test"