[Pkg-gnupg-commit] [gnupg2] 19/166: tests, w32: Fix GPGME tests requiring a pinentry.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Mar 16 22:33:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 02a39f0d1ed717f6fc33392e6ce4ab421c3bcbba
Author: Justus Winter <justus at g10code.com>
Date:   Wed Jan 25 16:53:40 2017 +0100

    tests,w32: Fix GPGME tests requiring a pinentry.
    
    * tests/gpgme/gpgme-defs.scm: Use our fake pinentry, and configure it
    to supply the correct passphrase.
    --
    Previously, the GPGME tests used the fake pinentry distributed with
    GPGME which is a Bourne shell script.  Use the fake pinentry from
    GnuPG instead.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 tests/gpgme/gpgme-defs.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/gpgme/gpgme-defs.scm b/tests/gpgme/gpgme-defs.scm
index 6e35285..c102c93 100644
--- a/tests/gpgme/gpgme-defs.scm
+++ b/tests/gpgme/gpgme-defs.scm
@@ -42,6 +42,9 @@
 (setenv "PATH" (string-append (path-join (getenv "GNUPG_BUILDDIR") "tools")
 			      (string *pathsep*) (getenv "PATH")) #t)
 
+;; The tests expect the pinentry to return the passphrase "abc".
+(setenv "PINENTRY_USER_DATA" "abc" #t)
+
 (define (create-file name content)
   (letfd ((fd (open name (logior O_WRONLY O_CREAT O_BINARY) #o600)))
     (display content (fdopen fd "wb"))))
@@ -50,8 +53,7 @@
   (create-file "gpg.conf" "no-force-v3-sigs\n")
   (create-file
    "gpg-agent.conf"
-   (string-append "pinentry-program "
-		  (in-gpgme-srcdir "tests" "gpg" "pinentry") "\n"))
+   (string-append "pinentry-program " (tool 'pinentry)))
   (mkdir "private-keys-v1.d" "-rwx")
 
   (log "Storing private keys")

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list