X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=02634ac1cebc88bb1673c88495f427bca82aef7a;hb=31b8ce4558de69860c95bf319a0a162316dce6c6;hp=bb32e97b2af747b35a2db1d82b44d6cc8333d244;hpb=2c5eed16b3b0bff9b6f488d3949ebdb62e8d1c35;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index bb32e97b..02634ac1 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -230,19 +230,10 @@ 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" } @@ -280,6 +271,8 @@ die () { 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 @@ -745,7 +738,7 @@ notmuch_json_show_sanitize () -e 's|"id": "[^"]*",|"id": "XXXXX",|g' \ -e 's|"Date": "Fri, 05 Jan 2001 [^"]*0000"|"Date": "GENERATED_DATE"|g' \ -e 's|"filename": "signature.asc",||g' \ - -e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g' \ + -e 's|"filename": \["/[^"]*"\],|"filename": \["YYYYY"\],|g' \ -e 's|"timestamp": 97.......|"timestamp": 42|g' \ -e 's|"content-length": [1-9][0-9]*|"content-length": "NONZERO"|g' } @@ -1286,11 +1279,6 @@ 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