[PATCH] tests: handle GnuPG 2.1 conversion in the test (issue5148)

Yuya Nishihara yuya at tcha.org
Wed Mar 30 10:19:41 EDT 2016


On Tue, 29 Mar 2016 12:19:49 -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1459278932 25200
> #      Tue Mar 29 12:15:32 2016 -0700
> # Node ID be397e140bc5ae0264303b681b57e107c6f8b0a6
> # Parent  5bdb724c3f8479a1134ee3883c46ddba5e31d3e5
> # EXP-Topic issue5148
> # Available At http://mercurial-scm.org/repo/users/marmoute/mercurial/
> #              hg pull http://mercurial-scm.org/repo/users/marmoute/mercurial/ -r be397e140bc5
> tests: handle GnuPG 2.1 conversion in the test (issue5148)
> 
> Some distributions are using gpg2 as their default binary. This trigger an
> automatic conversion of our gpg1 keyring. We acknowledge that these extra
> output might be present in the test.
> 
> diff --git a/tests/test-gpg.t b/tests/test-gpg.t
> --- a/tests/test-gpg.t
> +++ b/tests/test-gpg.t
> @@ -15,11 +15,17 @@ Test the GPG extension
>    $ hg ci -Amfoo
>    adding foo
>  
>    $ hg sigs
>  
> +(Some distros use GnuPG 2.1 as the default gpg binary, adding extra conversion output)
> +
>    $ HGEDITOR=cat hg sign -e 0
> +  gpg: starting migration from earlier GnuPG versions (?)
> +  gpg: porting secret keys from '$TESTDIR/tests/gpg/secring.gpg' to gpg-agent (?)
> +  gpg: key 4E24F1F2: secret key imported (?)
> +  gpg: migration succeeded (?)

The test failed with gpg2. It appears $TESTDIR isn't a valid replacement
keyword.

And the test might be less stable with gpg2 because of gpg-agent daemon.


More information about the Mercurial-devel mailing list