changeset 29802:28591876fa63

test-gpg: run migration of v1 secret keys beforehand This suppresses unwanted output at "hg sign".
author Yuya Nishihara <yuya@tcha.org>
date Sun, 14 Aug 2016 17:07:05 +0900
parents 94fb0458a791
children 58467204cac0
files tests/test-gpg.t
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-gpg.t	Sun Aug 14 17:01:33 2016 +0900
+++ b/tests/test-gpg.t	Sun Aug 14 17:07:05 2016 +0900
@@ -12,11 +12,13 @@
   $ GNUPGHOME="$TESTTMP/gpg"; export GNUPGHOME
   $ cp -R "$TESTDIR/gpg" "$GNUPGHOME"
 
-Start gpg-agent, which is required by GnuPG v2
+Start gpg-agent, which is required by GnuPG v2, and migrate secret keys
 
 #if gpg2
   $ gpg-connect-agent -q --subst /serverpid '/echo ${get serverpid}' /bye \
   > >> $DAEMON_PIDS
+  $ gpg --no-permission-warning --no-secmem-warning --list-secret-keys \
+  > > /dev/null 2>&1
 #endif
 
   $ hg init r