mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
test: use gpgconf --create-socketdir if available
This enables the shortened socket pathes in /run or equivalent. The explicit call to gpgconf is needed for nonstandard GNUPGHOME settings. (amended according to id:m2fujatr4k.fsf@guru.guru-group.fi)
This commit is contained in:
parent
12f7d4e61d
commit
e7b88e8b0a
1 changed files with 14 additions and 0 deletions
|
@ -229,10 +229,19 @@ test_fixed=0
|
|||
test_broken=0
|
||||
test_success=0
|
||||
|
||||
|
||||
_shutdown_gpg_agent () {
|
||||
if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} = 1 ]; then
|
||||
gpgconf --kill gpg-agent
|
||||
gpgconf --remove-socketdir
|
||||
fi
|
||||
}
|
||||
|
||||
_exit_common () {
|
||||
code=$?
|
||||
trap - EXIT
|
||||
set +ex
|
||||
_shutdown_gpg_agent
|
||||
rm -rf "$TEST_TMPDIR"
|
||||
}
|
||||
|
||||
|
@ -1276,6 +1285,11 @@ test_init_ () {
|
|||
|
||||
. ./test-lib-common.sh || exit 1
|
||||
|
||||
# we need the setting of GNUPGHOME in test-lib-common.sh
|
||||
if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} = 1 ]; then
|
||||
gpgconf --create-socketdir
|
||||
fi
|
||||
|
||||
emacs_generate_script
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue