aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgme/gpgme-defs.scm
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-01-25 15:53:40 +0000
committerJustus Winter <[email protected]>2017-01-25 15:58:46 +0000
commit02a39f0d1ed717f6fc33392e6ce4ab421c3bcbba (patch)
treec96f14859128847501762ccc7287982d5dd83304 /tests/gpgme/gpgme-defs.scm
parenttests,w32: Fix gpgsm signature verification test. (diff)
downloadgnupg-02a39f0d1ed717f6fc33392e6ce4ab421c3bcbba.tar.gz
gnupg-02a39f0d1ed717f6fc33392e6ce4ab421c3bcbba.zip
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 <[email protected]>
Diffstat (limited to 'tests/gpgme/gpgme-defs.scm')
-rw-r--r--tests/gpgme/gpgme-defs.scm6
1 files 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")