summaryrefslogtreecommitdiff
path: root/t/lib-gpg.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-01-29 15:51:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-01-29 20:35:05 (GMT)
commit1f985d60ef04aa9b291d01c093ed7496e26ccaee (patch)
tree8bfc259f8cc949baed2340be4fb00ceb365121b2 /t/lib-gpg.sh
parent830ff021aaaf12c43f06314feaf465377672d3ea (diff)
downloadgit-1f985d60ef04aa9b291d01c093ed7496e26ccaee.zip
git-1f985d60ef04aa9b291d01c093ed7496e26ccaee.tar.gz
git-1f985d60ef04aa9b291d01c093ed7496e26ccaee.tar.bz2
t/lib-gpg: sanity-check that we can actually sign
Some older versions of gpg (reportedly v1.2.6 from RHEL4) cannot import the keyrings found in our test suite, and thus cannot even make a signature. The previous change works it around, but we cannot anticipate breakages update to GPG would cause in the future. Do a test-sign before declaring the GPG prerequisite fulfilled to future-proof our tests. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-gpg.sh')
-rwxr-xr-xt/lib-gpg.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index 16e0d3f..db2ef22 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -36,6 +36,8 @@ else
"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \
"$TEST_DIRECTORY"/lib-gpg/ownertrust &&
+ gpg --homedir "${GNUPGHOME}" </dev/null >/dev/null 2>&1 \
+ --sign -u committer@example.com &&
test_set_prereq GPG
;;
esac