]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/lib-gpg: call prepare_gnupghome() in GPG2 prereq
authorTodd Zullinger <tmz@pobox.com>
Wed, 3 Jul 2024 15:37:32 +0000 (11:37 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Oct 2025 00:58:35 +0000 (17:58 -0700)
The GPG2 prereq added in 2f36339fa8 (t/lib-gpg: introduce new prereq
GPG2, 2023-06-04) does not create the $GNUPGHOME directory.

Tests which use the GPG2 prereq without previously using the GPG prereq
fail because of the missing directory.  This currently affects
t1016-compatObjectFormat.

Ensure $GNUPGHOME is created in the GPG2 prereq.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-gpg.sh

index 4e44f182bb64213f6ec4df7f4b94a1b4ed51602a..21666b2ab066c2b007e3a9c1437a5d18fdaac225 100644 (file)
@@ -66,6 +66,7 @@ test_lazy_prereq GPG2 '
                exit 1
                ;;
        *)
+               prepare_gnupghome &&
                (gpgconf --kill all || : ) &&
                gpg --homedir "${GNUPGHOME}" --import \
                        "$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&