##// END OF EJS Templates
test-gpg: start gpg-agent by gpg-connect-agent only if GnuPG v2.1+ detected...
Yuya Nishihara -
r29873:80ba176b default
parent child Browse files
Show More
@@ -357,6 +357,10 b' def has_gpg():'
357 def has_gpg2():
357 def has_gpg2():
358 return matchoutput('gpg --version 2>&1', br'GnuPG[^0-9]+2\.')
358 return matchoutput('gpg --version 2>&1', br'GnuPG[^0-9]+2\.')
359
359
360 @check("gpg21", "gpg client v2.1+")
361 def has_gpg21():
362 return matchoutput('gpg --version 2>&1', br'GnuPG[^0-9]+2\.(?!0)')
363
360 @check("unix-permissions", "unix-style permissions")
364 @check("unix-permissions", "unix-style permissions")
361 def has_unix_permissions():
365 def has_unix_permissions():
362 d = tempfile.mkdtemp(dir='.', prefix=tempprefix)
366 d = tempfile.mkdtemp(dir='.', prefix=tempprefix)
@@ -12,11 +12,16 b' Test the GPG extension'
12 $ GNUPGHOME="$TESTTMP/gpg"; export GNUPGHOME
12 $ GNUPGHOME="$TESTTMP/gpg"; export GNUPGHOME
13 $ cp -R "$TESTDIR/gpg" "$GNUPGHOME"
13 $ cp -R "$TESTDIR/gpg" "$GNUPGHOME"
14
14
15 Start gpg-agent, which is required by GnuPG v2, and migrate secret keys
15 Start gpg-agent, which is required by GnuPG v2
16
17 #if gpg21
18 $ gpg-connect-agent -q --subst /serverpid '/echo ${get serverpid}' /bye \
19 > >> $DAEMON_PIDS
20 #endif
21
22 and migrate secret keys
16
23
17 #if gpg2
24 #if gpg2
18 $ gpg-connect-agent -q --subst /serverpid '/echo ${get serverpid}' /bye \
19 > >> $DAEMON_PIDS
20 $ gpg --no-permission-warning --no-secmem-warning --list-secret-keys \
25 $ gpg --no-permission-warning --no-secmem-warning --list-secret-keys \
21 > > /dev/null 2>&1
26 > > /dev/null 2>&1
22 #endif
27 #endif
General Comments 0
You need to be logged in to leave comments. Login now