]> git.eshelyaron.com Git - emacs.git/commitdiff
Stop some epg tests failing on rhel7 with gpg 2.0.22 (bug#23619)
authorGlenn Morris <rgm@gnu.org>
Tue, 16 May 2017 01:01:30 +0000 (21:01 -0400)
committerGlenn Morris <rgm@gnu.org>
Tue, 16 May 2017 01:01:30 +0000 (21:01 -0400)
* test/lisp/epg-tests.el (with-epg-tests):
Also set GNUPGHOME in the environment of child processes.
This avoids problems if gpg does not pass --homedir to spawned agent.
; Ref eg https://gpgtools.tenderapp.com/discussions/problems/29537-gpg2-doesnt-start-agent-properly-if-using-homedir

test/lisp/epg-tests.el

index c61527207ff3209571f80d8d8407998b29fe99fa..9dd093e7927043be4c87782351ed1d9dfb78f350 100644 (file)
                            &rest body)
   "Set up temporary locations and variables for testing."
   (declare (indent 1) (debug (sexp body)))
-  `(let ((epg-tests-home-directory (make-temp-file "epg-tests-homedir" t))
-         (process-environment (cons "GPG_AGENT_INFO" process-environment)))
+  `(let* ((epg-tests-home-directory (make-temp-file "epg-tests-homedir" t))
+         (process-environment
+          (append
+           (list "GPG_AGENT_INFO"
+                 (format "GNUPGHOME=%s" epg-tests-home-directory))
+           process-environment)))
      (unwind-protect
         (let ((context (epg-make-context 'OpenPGP)))
            (setf (epg-context-program context)