]> git.eshelyaron.com Git - emacs.git/commitdiff
; Minor fixes in tramp-tests.el
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 3 Dec 2024 12:23:28 +0000 (13:23 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 4 Dec 2024 17:05:02 +0000 (18:05 +0100)
* test/lisp/net/tramp-tests.el (ert-batch-backtrace-right-margin):
Set it to nil.
(tramp--test-enabled): Fix regexps.

(cherry picked from commit fef05ba8f409738625167991e811c2ab50f5b047)

test/lisp/net/tramp-tests.el

index 2fa277667c75a5c6c29e1f0897b6d43d52040c1d..4efcc6daf1dfd3f2ac4f6a0df2006ca1e7e6443a 100644 (file)
 
 (setq auth-source-cache-expiry nil
       auth-source-save-behavior nil
+      ert-batch-backtrace-right-margin nil
       password-cache-expiry nil
       remote-file-name-inhibit-cache nil
       tramp-allow-unsafe-temporary-files t
@@ -254,30 +255,27 @@ being the result.")
     (dolist (dir `(,temporary-file-directory
                   ,tramp-compat-temporary-file-directory
                   ,ert-remote-temporary-file-directory))
-      (dolist
-         (file
-          (directory-files
-           dir 'full
-           (rx bos (? ".#")
-               (| (literal tramp-test-name-prefix)
-                  (eval (if (getenv "TRAMP_TEST_CLEANUP_TEMP_FILES")
-                            tramp-temp-name-prefix 'unmatchable))))))
+      (dolist (file (directory-files
+                    dir 'full
+                    (rx-to-string
+                     `(: bos (? ".#")
+                         (| ,tramp-test-name-prefix
+                            ,(if (getenv "TRAMP_TEST_CLEANUP_TEMP_FILES")
+                                 tramp-temp-name-prefix 'unmatchable))))))
 
        ;; Exclude sockets and FUSE mount points.
        (ignore-errors
          (unless
              (or (string-prefix-p
                   "srw" (file-attribute-modes (file-attributes file)))
-                 (string-match-p (rx bos (literal tramp-fuse-name-prefix)
-                                     (regexp tramp-method-regexp) ".")
-                                 (file-name-nondirectory file))
                  ;; Prior Emacs 31.1, the FUSE mount points where
-                 ;; "tramp-rclone.*" and "tramp-sshfs.*".  We should
-                 ;; exclude them as well, in order not to make
-                 ;; trouble.
-                 (string-match-p (rx bos (literal tramp-temp-name-prefix)
-                                     (| "rclone" "fuse") ".")
-                                 (file-name-nondirectory file)))
+                 ;; "tramp.rclone.*" and "tramp.sshfs.*".  We should
+                 ;; exclude them as well, in order to avoid trouble.
+                 (string-match-p
+                  (rx bos (| (literal tramp-fuse-name-prefix)
+                             (literal tramp-temp-name-prefix))
+                      (| "rclone" "sshfs") ".")
+                  (file-name-nondirectory file)))
            (tramp--test-message "Delete %s" file)
            (if (file-directory-p file)
                (delete-directory file 'recursive)