test: move GNUPGHOME to TEST_TMPDIR
authorDavid Bremner <david@tethera.net>
Mon, 27 Feb 2017 23:53:56 +0000 (19:53 -0400)
committerDavid Bremner <david@tethera.net>
Tue, 28 Feb 2017 00:01:42 +0000 (20:01 -0400)
We already use this directory for dtach sockets, so it makes sense to
put gnupg sockets there as well. There doesn't seem to be a clean way
to put a fully functional socket in a different location than
GNUPGHOME.

test/test-lib-common.sh
test/test-lib.sh

index 03ef1d2d02467674f4f096fcd872a409fe7421fe..a96cfbeba019c081ef0f164ddffaad90561f06f3 100644 (file)
@@ -158,7 +158,6 @@ export HOME="${TMP_DIRECTORY}/home"
 mkdir -p "${HOME}"
 
 MAIL_DIR="${TMP_DIRECTORY}/mail"
 mkdir -p "${HOME}"
 
 MAIL_DIR="${TMP_DIRECTORY}/mail"
-export GNUPGHOME="${TMP_DIRECTORY}/gnupg"
 export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config"
 
 mkdir -p "${test}"
 export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config"
 
 mkdir -p "${test}"
index 86e792a85df67007cc66a3925b99e91b8ddb60e3..518d9c7fdb001b1a807182f068dae1cc2bb86b8a 100644 (file)
@@ -270,6 +270,8 @@ die () {
 GIT_EXIT_OK=
 # Note: TEST_TMPDIR *NOT* exported!
 TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX")
 GIT_EXIT_OK=
 # Note: TEST_TMPDIR *NOT* exported!
 TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX")
+# Put GNUPGHOME in TMPDIR to avoid problems with long paths.
+export GNUPGHOME="${TEST_TMPDIR}/gnupg"
 trap 'trap_exit' EXIT
 trap 'trap_signal' HUP INT TERM
 
 trap 'trap_exit' EXIT
 trap 'trap_signal' HUP INT TERM