Patchwork tests: handle GnuPG 2.1 conversion in the test (issue5148)

login
register
mail settings
Submitter Pierre-Yves David
Date March 29, 2016, 7:19 p.m.
Message ID <be397e140bc5ae026430.1459279189@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/14161/
State Changes Requested
Headers show

Comments

Pierre-Yves David - March 29, 2016, 7:19 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.
Yuya Nishihara - March 30, 2016, 2:19 p.m.
On Tue, 29 Mar 2016 12:19:49 -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@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.

Patch

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 (?)
   signing 0:e63c23eaa88a
   Added signature for changeset e63c23eaa88a
   
   
   HG: Enter commit message.  Lines beginning with 'HG:' are removed.