emacs-diffs
[Top][All Lists]
Advanced

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

master da8b323f824: ; Fix debug logging for synchronous commands in Eshe


From: Jim Porter
Subject: master da8b323f824: ; Fix debug logging for synchronous commands in Eshell tests
Date: Fri, 1 Sep 2023 12:28:10 -0400 (EDT)

branch: master
commit da8b323f82417697f9b772689810099f426fe616
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>

    ; Fix debug logging for synchronous commands in Eshell tests
    
    * lisp/eshell/eshell.el (eshell-command-result): Call
    'eshell-debug-command-start'.
    * test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell): Update
    comment.
    (eshell-test-command-result): Set 'eshell-debug-command'.
---
 lisp/eshell/eshell.el                    | 1 +
 test/lisp/eshell/eshell-tests-helpers.el | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index cbd0de3c093..a3f80f453eb 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -357,6 +357,7 @@ corresponding to a successful execution."
     (with-temp-buffer
       (let ((eshell-non-interactive-p t))
        (eshell-mode)
+        (eshell-debug-command-start command)
        (let ((result (eshell-do-eval
                       (list 'eshell-commands
                             (list 'eshell-command-to-value
diff --git a/test/lisp/eshell/eshell-tests-helpers.el 
b/test/lisp/eshell/eshell-tests-helpers.el
index e300f3d657a..c983c8fd2bb 100644
--- a/test/lisp/eshell/eshell-tests-helpers.el
+++ b/test/lisp/eshell/eshell-tests-helpers.el
@@ -58,7 +58,8 @@ beginning of the test file."
               ;; to remove this eventually once we're confident that
               ;; all the process bugs have been worked out.  (At that
               ;; point, we can just enable this selectively when
-              ;; needed.)
+              ;; needed.)  See also `eshell-test-command-result'
+              ;; below.
               (eshell-debug-command (cons 'process eshell-debug-command))
               (eshell-history-file-name nil)
               (eshell-last-dir-ring-file-name nil)
@@ -159,7 +160,10 @@ inserting the command."
 (defun eshell-test-command-result (command)
   "Like `eshell-command-result', but not using HOME."
   (ert-with-temp-directory eshell-directory-name
-    (let ((eshell-history-file-name nil))
+    (let ((eshell-history-file-name nil)
+          ;; Enable process debug instrumentation.  See
+          ;; `with-temp-eshell' above.
+          (eshell-debug-command (cons 'process eshell-debug-command)))
       (eshell-command-result command))))
 
 (defun eshell-command-result--equal (_command actual expected)



reply via email to

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