From 24d06313c4f205061fb74c9665d5819a05362636 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 15 May 2017 21:01:30 -0400 Subject: [PATCH] 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 --- test/lisp/epg-tests.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.39.2