emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 5936f6c: ; Trace epg-tests gpg config finding (Bug#


From: Noam Postavsky
Subject: [Emacs-diffs] master 5936f6c: ; Trace epg-tests gpg config finding (Bug#23561)
Date: Sat, 14 Jul 2018 09:02:03 -0400 (EDT)

branch: master
commit 5936f6cdac09aa2f420f7f3756cf77629af99344
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    ; Trace epg-tests gpg config finding (Bug#23561)
---
 test/Makefile.in       |  1 +
 test/lisp/epg-tests.el | 15 ++++++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/test/Makefile.in b/test/Makefile.in
index 0bc893b..6070932 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -169,6 +169,7 @@ WRITE_LOG = > $@ 2>&1 || { STAT=$$?; cat $@; exit $$STAT; }
 ifdef EMACS_HYDRA_CI
 ## On Hydra, always show logs for certain problematic tests.
 lisp/net/tramp-tests.log \
+lisp/epg-tests.log \
 : WRITE_LOG = 2>&1 | tee $@
 endif
 
diff --git a/test/lisp/epg-tests.el b/test/lisp/epg-tests.el
index 7efe04b..361ba8f 100644
--- a/test/lisp/epg-tests.el
+++ b/test/lisp/epg-tests.el
@@ -23,6 +23,7 @@
 
 (require 'ert)
 (require 'epg)
+(require 'trace)
 
 (defvar epg-tests-context nil)
 
@@ -42,7 +43,19 @@
     prog-alist))
 
 (defun epg-tests-find-usable-gpg-configuration (&optional _require-passphrase)
-  (epg-find-configuration 'OpenPGP 'no-cache epg-tests--config-program-alist))
+  ;; Tracing for Bug#23561, but only do it once per run.
+  (if (get-buffer "*trace-output*")
+      (epg-find-configuration 'OpenPGP 'no-cache 
epg-tests--config-program-alist)
+    (dolist (fun '(epg-find-configuration
+                   executable-find
+                   epg-check-configuration
+                   epg-config--make-gpg-configuration))
+      (trace-function-background fun))
+    (prog1 (unwind-protect
+               (epg-find-configuration 'OpenPGP 'no-cache 
epg-tests--config-program-alist)
+             (untrace-all))
+      (princ (with-current-buffer "*trace-output*" (buffer-string))
+             #'external-debugging-output))))
 
 (defun epg-tests-passphrase-callback (_c _k _d)
   ;; Need to create a copy here, since the string will be wiped out



reply via email to

[Prev in Thread] Current Thread [Next in Thread]