diff options
| author | Noam Postavsky | 2018-07-14 08:58:26 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2018-07-14 09:01:39 -0400 |
| commit | 5936f6cdac09aa2f420f7f3756cf77629af99344 (patch) | |
| tree | 8e9dfd06187da1016880d5aa88dbab9466f5e364 /test | |
| parent | 9f25231f354a973d5331b62717ec46e0cbcbbc6e (diff) | |
| download | emacs-5936f6cdac09aa2f420f7f3756cf77629af99344.tar.gz emacs-5936f6cdac09aa2f420f7f3756cf77629af99344.zip | |
; Trace epg-tests gpg config finding (Bug#23561)
Diffstat (limited to 'test')
| -rw-r--r-- | test/Makefile.in | 1 | ||||
| -rw-r--r-- | test/lisp/epg-tests.el | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/test/Makefile.in b/test/Makefile.in index 0bc893bc0c6..6070932508d 100644 --- a/test/Makefile.in +++ b/test/Makefile.in | |||
| @@ -169,6 +169,7 @@ WRITE_LOG = > $@ 2>&1 || { STAT=$$?; cat $@; exit $$STAT; } | |||
| 169 | ifdef EMACS_HYDRA_CI | 169 | ifdef EMACS_HYDRA_CI |
| 170 | ## On Hydra, always show logs for certain problematic tests. | 170 | ## On Hydra, always show logs for certain problematic tests. |
| 171 | lisp/net/tramp-tests.log \ | 171 | lisp/net/tramp-tests.log \ |
| 172 | lisp/epg-tests.log \ | ||
| 172 | : WRITE_LOG = 2>&1 | tee $@ | 173 | : WRITE_LOG = 2>&1 | tee $@ |
| 173 | endif | 174 | endif |
| 174 | 175 | ||
diff --git a/test/lisp/epg-tests.el b/test/lisp/epg-tests.el index 7efe04bfc00..361ba8fc0c2 100644 --- a/test/lisp/epg-tests.el +++ b/test/lisp/epg-tests.el | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | (require 'ert) | 24 | (require 'ert) |
| 25 | (require 'epg) | 25 | (require 'epg) |
| 26 | (require 'trace) | ||
| 26 | 27 | ||
| 27 | (defvar epg-tests-context nil) | 28 | (defvar epg-tests-context nil) |
| 28 | 29 | ||
| @@ -42,7 +43,19 @@ | |||
| 42 | prog-alist)) | 43 | prog-alist)) |
| 43 | 44 | ||
| 44 | (defun epg-tests-find-usable-gpg-configuration (&optional _require-passphrase) | 45 | (defun epg-tests-find-usable-gpg-configuration (&optional _require-passphrase) |
| 45 | (epg-find-configuration 'OpenPGP 'no-cache epg-tests--config-program-alist)) | 46 | ;; Tracing for Bug#23561, but only do it once per run. |
| 47 | (if (get-buffer "*trace-output*") | ||
| 48 | (epg-find-configuration 'OpenPGP 'no-cache epg-tests--config-program-alist) | ||
| 49 | (dolist (fun '(epg-find-configuration | ||
| 50 | executable-find | ||
| 51 | epg-check-configuration | ||
| 52 | epg-config--make-gpg-configuration)) | ||
| 53 | (trace-function-background fun)) | ||
| 54 | (prog1 (unwind-protect | ||
| 55 | (epg-find-configuration 'OpenPGP 'no-cache epg-tests--config-program-alist) | ||
| 56 | (untrace-all)) | ||
| 57 | (princ (with-current-buffer "*trace-output*" (buffer-string)) | ||
| 58 | #'external-debugging-output)))) | ||
| 46 | 59 | ||
| 47 | (defun epg-tests-passphrase-callback (_c _k _d) | 60 | (defun epg-tests-passphrase-callback (_c _k _d) |
| 48 | ;; Need to create a copy here, since the string will be wiped out | 61 | ;; Need to create a copy here, since the string will be wiped out |