Skip to content

Commit 1f985d6

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 830ff02 commit 1f985d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

t/lib-gpg.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ else
3636
"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
3737
gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \
3838
"$TEST_DIRECTORY"/lib-gpg/ownertrust &&
39+
gpg --homedir "${GNUPGHOME}" </dev/null >/dev/null 2>&1 \
40+
--sign -u [email protected] &&
3941
test_set_prereq GPG
4042
;;
4143
esac

0 commit comments

Comments
 (0)