From: Glenn Morris Date: Tue, 16 May 2017 01:01:30 +0000 (-0400) Subject: Stop some epg tests failing on rhel7 with gpg 2.0.22 (bug#23619) X-Git-Tag: emacs-26.0.90~521^2~395 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=24d06313c4f205061fb74c9665d5819a05362636;p=emacs.git Stop some epg tests failing on rhel7 with gpg 2.0.22 (bug#23619) * 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 --- diff --git a/test/lisp/epg-tests.el b/test/lisp/epg-tests.el index c61527207ff..9dd093e7927 100644 --- a/test/lisp/epg-tests.el +++ b/test/lisp/epg-tests.el @@ -53,8 +53,12 @@ &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)