emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ef06178: Improve Tramp test performance


From: Michael Albinus
Subject: [Emacs-diffs] master ef06178: Improve Tramp test performance
Date: Fri, 30 Mar 2018 06:36:16 -0400 (EDT)

branch: master
commit ef0617888c452d1a62d354b3d866f17eea2e1ced
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Improve Tramp test performance
    
    * lisp/net/tramp.el (tramp-backtrace): Improve performance.
    
    * test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules):
    Skip for older Emacsen.
    (tramp-test39-utf8): Remove instrumentation.
---
 lisp/net/tramp.el            | 9 +++++----
 test/lisp/net/tramp-tests.el | 6 ++++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 43b5e77..52ff021 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1691,10 +1691,11 @@ applicable)."
   "Dump a backtrace into the debug buffer.
 If VEC-OR-PROC is nil, the buffer *debug tramp* is used.  This
 function is meant for debugging purposes."
-  (if vec-or-proc
-      (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace)))
-    (if (>= tramp-verbose 10)
-       (with-output-to-temp-buffer "*debug tramp*" (backtrace)))))
+  (when (>= tramp-verbose 10)
+    (if vec-or-proc
+       (tramp-message
+        vec-or-proc 10 "\n%s" (with-output-to-string (backtrace)))
+      (with-output-to-temp-buffer "*debug tramp*" (backtrace)))))
 
 (defsubst tramp-error (vec-or-proc signal fmt-string &rest arguments)
   "Emit an error.
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 5e79a4b..3ca401b 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -1727,6 +1727,8 @@ handled properly.  BODY shall not contain a timeout."
   "Check host name rules for host-less methods."
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-sh-p))
+  ;; `user-error' has appeared in Emacs 24.3.
+  (skip-unless (fboundp 'user-error))
 
   ;; Host names must match rules in case the command template of a
   ;; method doesn't use them.
@@ -4687,8 +4689,7 @@ Use the `ls' command."
   (skip-unless (not (tramp--test-windows-nt-and-batch)))
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
 
-  (tramp--test-instrument-test-case 10
-  (tramp--test-utf8)))
+  (tramp--test-utf8))
 
 (ert-deftest tramp-test39-utf8-with-stat ()
   "Check UTF8 encoding in file names and file contents.
@@ -5117,6 +5118,7 @@ Since it unloads Tramp, it shall be the last test to run."
 ;; * file-name-case-insensitive-p
 
 ;; * Work on skipped tests.  Make a comment, when it is impossible.
+;; * Revisit expensive tests, once problems in tramp-error are solved.
 ;; * Fix `tramp-test05-expand-file-name-relative' in `expand-file-name'.
 ;; * Fix `tramp-test06-directory-file-name' for `ftp'.
 ;; * Investigate, why `tramp-test11-copy-file' and `tramp-test12-rename-file'



reply via email to

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