X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=1baa2d209a834c1f92328423657d305b6258b33a;hb=51c43d0e925486b2c7b9a708ba9aebc22dde57a6;hp=ac1b9315d44f4d0851ee06ddf6ecc74c6589abd3;hpb=7eaac52ddbb7c95b7e92c24d84eecdb3e9691021;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index ac1b9315..1baa2d20 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -110,10 +110,10 @@ unset ALTERNATE_EDITOR add_gnupg_home () { local output - [ -d ${GNUPGHOME} ] && return + [ -e "${GNUPGHOME}/gpg.conf" ] && return _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; } at_exit_function _gnupg_exit - mkdir -m 0700 "$GNUPGHOME" + mkdir -p -m 0700 "$GNUPGHOME" gpg --no-tty --import <$NOTMUCH_SRCDIR/test/gnupg-secret-key.asc >"$GNUPGHOME"/import.log 2>&1 test_debug "cat $GNUPGHOME/import.log" if (gpg --quick-random --version >/dev/null 2>&1) ; then @@ -132,10 +132,10 @@ add_gnupg_home () add_gpgsm_home () { local fpr - [ -d "$GNUPGHOME" ] && return + [ -e "$GNUPGHOME/gpgsm.conf" ] && return _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; } at_exit_function _gnupg_exit - mkdir -m 0700 "$GNUPGHOME" + mkdir -p -m 0700 "$GNUPGHOME" openssl pkcs12 -export -passout pass: -inkey "$NOTMUCH_SRCDIR/test/smime/key+cert.pem" \ < "$NOTMUCH_SRCDIR/test/smime/test.crt" | \ gpgsm --batch --no-tty --no-common-certs-import --pinentry-mode=loopback --passphrase-fd 3 \