summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-11 20:27:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-11 20:27:00 (GMT)
commita6f1456380f114e26d68771d9316c57ab468b8fe (patch)
tree9379ecdc25cb4e5c6bfebe9eafa5e56e85e0b460
parente57856502d93d1571d1280638b5b33000412d109 (diff)
parent29ff1f8f7493ecd5b90521adff6ed523d61ec73f (diff)
downloadgit-a6f1456380f114e26d68771d9316c57ab468b8fe.zip
git-a6f1456380f114e26d68771d9316c57ab468b8fe.tar.gz
git-a6f1456380f114e26d68771d9316c57ab468b8fe.tar.bz2
Merge branch 'st/lib-gpg-kill-stray-agent'
Some versions of GnuPG fails to kill gpg-agent it auto-spawned and such a left-over agent can interfere with a test. Work it around by attempting to kill one before starting a new test. * st/lib-gpg-kill-stray-agent: t: lib-gpg: flush gpg agent on startup
-rwxr-xr-xt/lib-gpg.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index ec2aa8f..43679a4 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -31,6 +31,7 @@ then
chmod 0700 ./gpghome &&
GNUPGHOME="$(pwd)/gpghome" &&
export GNUPGHOME &&
+ (gpgconf --kill gpg-agent 2>&1 >/dev/null || : ) &&
gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \
"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \