t7510: do not fail when gpg warns about insecure memory
authorKyle J. McKay <mackyle@gmail.com>
Mon, 9 Mar 2015 20:03:01 +0000 (13:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Mar 2015 22:25:22 +0000 (15:25 -0700)
Depending on how gpg was built, it may issue the following
message to stderr when run:

Warning: using insecure memory!

When the test is collecting gpg output it is therefore not
enough to just match on a "gpg: " prefix it must also match
on a "Warning: " prefix wherever it needs to match lines
that have been produced by gpg.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Acked-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7510-signed-commit.sh
index dd4b94823e182811b0ddf2a1e997e50ba7c815ad..c24d38248aa54ecdfcc90d747ff0abd47e9cb72b 100755 (executable)
@@ -73,8 +73,8 @@ test_expect_success GPG 'show signed commit with signature' '
        git show -s --show-signature initial >show &&
        git verify-commit -v initial >verify.1 2>verify.2 &&
        git cat-file commit initial >cat &&
-       grep -v "gpg: " show >show.commit &&
-       grep "gpg: " show >show.gpg &&
+       grep -v -e "gpg: " -e "Warning: " show >show.commit &&
+       grep -e "gpg: " -e "Warning: " show >show.gpg &&
        grep -v "^ " cat | grep -v "^gpgsig " >cat.commit &&
        test_cmp show.commit commit &&
        test_cmp show.gpg verify.2 &&