]> git.eshelyaron.com Git - emacs.git/commitdiff
; Trace epg-tests gpg config finding (Bug#23561)
authorNoam Postavsky <npostavs@gmail.com>
Sat, 14 Jul 2018 12:58:26 +0000 (08:58 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sat, 14 Jul 2018 13:01:39 +0000 (09:01 -0400)
test/Makefile.in
test/lisp/epg-tests.el

index 0bc893bc0c69b3f5c9194c734c589096d7db3d62..6070932508d47c0165bd080c6885a41b7b32827c 100644 (file)
@@ -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
 
index 7efe04bfc007e66b477d78a826e5ac16b1f6bcc3..361ba8fc0c24470643ee84b775a4442a73fca6ef 100644 (file)
@@ -23,6 +23,7 @@
 
 (require 'ert)
 (require 'epg)
+(require 'trace)
 
 (defvar epg-tests-context nil)
 
     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