From 02a39f0d1ed717f6fc33392e6ce4ab421c3bcbba Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 25 Jan 2017 16:53:40 +0100 Subject: [PATCH] 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 --- 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 6e3528586..c102c9386 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")