projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
299e187
)
test: create TEST_TMPDIR for holding temporary files
author
Tomi Ollila
<tomi.ollila@iki.fi>
Wed, 16 Nov 2011 19:09:00 +0000
(21:09 +0200)
committer
David Bremner
<bremner@debian.org>
Thu, 17 Nov 2011 23:35:32 +0000
(19:35 -0400)
The TEST_TMPDIR if first needed to hold dtach's socket (due
to 108-character limit in socket file names). Later it can be
used to hold other temporary files; directory deleted at exit.
test/test-lib.sh
patch
|
blob
|
history
diff --git
a/test/test-lib.sh
b/test/test-lib.sh
index 1ea7fa976b8acd01f212c30f9627ceedcde7a9b4..87f78c999a14de58d4d325f76f615a944dac3217 100755
(executable)
--- a/
test/test-lib.sh
+++ b/
test/test-lib.sh
@@
-174,6
+174,7
@@
test_success=0
die () {
code=$?
+ rm -rf "$TEST_TMPDIR"
if test -n "$GIT_EXIT_OK"
then
exit $code
@@
-184,6
+185,8
@@
die () {
}
GIT_EXIT_OK=
+# Note: TEST_TMPDIR *NOT* exported!
+TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX")
trap 'die' EXIT
test_decode_color () {