mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-18 17:25:57 +01:00
test: create TEST_TMPDIR for holding temporary files
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.
This commit is contained in:
parent
299e187bdf
commit
a0ec104f13
1 changed files with 3 additions and 0 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue