Skip to content

Commit

Permalink
t/lib-gpg: sanity-check that we can actually sign
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Jan 29, 2015
1 parent 830ff02 commit 1f985d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions t/lib-gpg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f985d6

Please sign in to comment.