summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-03-13 22:56:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-03-13 22:56:17 (GMT)
commit21b839e606c173efa942dc282b3b6b542d7242f5 (patch)
treefe5770986ceb0aada8f0e07774b5aee1e0d1b5d0 /t
parentbde1e3e80a16a850da95af836ef85c5669c989a2 (diff)
parentb0b70d54c4a17476f04ce17255c6558425c11367 (diff)
downloadgit-21b839e606c173efa942dc282b3b6b542d7242f5.zip
git-21b839e606c173efa942dc282b3b6b542d7242f5.tar.gz
git-21b839e606c173efa942dc282b3b6b542d7242f5.tar.bz2
Merge branch 'fs/gpgsm-update'
Newer version of GPGSM changed its output in a backward incompatible way to break our code that parses its output. It also added more processes our tests need to kill when cleaning up. Adjustments have been made to accommodate these changes. * fs/gpgsm-update: t/lib-gpg: kill all gpg components, not just gpg-agent t/lib-gpg: reload gpg components after updating trustlist gpg-interface/gpgsm: fix for v2.3
Diffstat (limited to 't')
-rw-r--r--t/lib-gpg.sh11
-rwxr-xr-xt/t4202-log.sh3
2 files changed, 7 insertions, 7 deletions
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index 3e7ee13..1147855 100644
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -40,7 +40,7 @@ test_lazy_prereq GPG '
# > lib-gpg/ownertrust
mkdir "$GNUPGHOME" &&
chmod 0700 "$GNUPGHOME" &&
- (gpgconf --kill gpg-agent || : ) &&
+ (gpgconf --kill all || : ) &&
gpg --homedir "${GNUPGHOME}" --import \
"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
gpg --homedir "${GNUPGHOME}" --import-ownertrust \
@@ -72,12 +72,11 @@ test_lazy_prereq GPGSM '
--passphrase-fd 0 --pinentry-mode loopback \
--import "$TEST_DIRECTORY"/lib-gpg/gpgsm_cert.p12 &&
- gpgsm --homedir "${GNUPGHOME}" -K |
- grep fingerprint: |
- cut -d" " -f4 |
- tr -d "\\n" >"${GNUPGHOME}/trustlist.txt" &&
+ gpgsm --homedir "${GNUPGHOME}" -K --with-colons |
+ awk -F ":" "/^fpr:/ {printf \"%s S relax\\n\", \$10}" \
+ >"${GNUPGHOME}/trustlist.txt" &&
+ (gpgconf --reload all || : ) &&
- echo " S relax" >>"${GNUPGHOME}/trustlist.txt" &&
echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
-u committer@example.com -o /dev/null --sign -
'
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 55fac64..6306e2c 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -2037,7 +2037,8 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss
git merge --no-ff -m msg signed_tag_x509_nokey &&
GNUPGHOME=. git log --graph --show-signature -n1 plain-x509-nokey >actual &&
grep "^|\\\ merged tag" actual &&
- grep "^| | gpgsm: certificate not found" actual
+ grep -e "^| | gpgsm: certificate not found" \
+ -e "^| | gpgsm: failed to find the certificate: Not found" actual
'
test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 bad signature' '