;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
;; Package: tramp
-;; Version: 2.5.0-pre
+;; Version: 2.5.0
;; Package-Requires: ((emacs "25.1"))
;; Package-Type: multi
;; URL: https://www.gnu.org/software/tramp/
;; ./configure" to change them.
;;;###tramp-autoload
-(defconst tramp-version "2.5.0-pre"
+(defconst tramp-version "2.5.0"
"This version of Tramp.")
;;;###tramp-autoload
;; Check for Emacs version.
(let ((x (if (not (string-lessp emacs-version "25.1"))
"ok"
- (format "Tramp 2.5.0-pre is not fit for %s"
+ (format "Tramp 2.5.0 is not fit for %s"
(replace-regexp-in-string "\n" "" (emacs-version))))))
(unless (string-equal "ok" x) (error "%s" x)))
"Define ert test `TEST-direct-async' for direct async processes.
If UNSTABLE is non-nil, the test is tagged as `:unstable'."
(declare (indent 1))
- `(ert-deftest ,(intern (concat (symbol-name test) "-direct-async")) ()
- ,docstring
- :tags (if ,unstable '(:expensive-test :unstable) '(:expensive-test))
- (skip-unless (tramp--test-enabled))
- (let ((default-directory tramp-test-temporary-file-directory)
- (ert-test (ert-get-test ',test))
- (tramp-connection-properties
- (cons '(nil "direct-async-process" t) tramp-connection-properties)))
- (skip-unless (tramp-direct-async-process-p))
- ;; For whatever reason, it doesn't cooperate with the "mock" method.
- (skip-unless (not (tramp--test-mock-p)))
- ;; We do expect an established connection already,
- ;; `file-truename' does it by side-effect. Suppress
- ;; `tramp--test-enabled', in order to keep the connection.
- (cl-letf (((symbol-function #'tramp--test-enabled) (lambda nil t)))
- (file-truename tramp-test-temporary-file-directory)
- (funcall (ert-test-body ert-test))))))
+ ;; `make-process' supports file name handlers since Emacs 27.
+ (when (let ((file-name-handler-alist '(("" . (lambda (&rest _) t)))))
+ (ignore-errors (make-process :file-handler t)))
+ `(ert-deftest ,(intern (concat (symbol-name test) "-direct-async")) ()
+ ,docstring
+ :tags (if ,unstable '(:expensive-test :unstable) '(:expensive-test))
+ (skip-unless (tramp--test-enabled))
+ (let ((default-directory tramp-test-temporary-file-directory)
+ (ert-test (ert-get-test ',test))
+ (tramp-connection-properties
+ (cons '(nil "direct-async-process" t)
+ tramp-connection-properties)))
+ (skip-unless (tramp-direct-async-process-p))
+ ;; For whatever reason, it doesn't cooperate with the "mock" method.
+ (skip-unless (not (tramp--test-mock-p)))
+ ;; We do expect an established connection already,
+ ;; `file-truename' does it by side-effect. Suppress
+ ;; `tramp--test-enabled', in order to keep the connection.
+ ;; Suppress "Process ... finished" messages.
+ (cl-letf (((symbol-function #'tramp--test-enabled) (lambda nil t))
+ ((symbol-function #'internal-default-process-sentinel)
+ #'ignore))
+ (file-truename tramp-test-temporary-file-directory)
+ (funcall (ert-test-body ert-test)))))))
(tramp--test--deftest-direct-async-process tramp-test29-start-file-process
"Check direct async `start-file-process'.")
(command output-buffer &optional error-buffer input)
"Like `async-shell-command', reading the output.
INPUT, if non-nil, is a string sent to the process."
- (async-shell-command command output-buffer error-buffer)
- (let ((proc (get-buffer-process output-buffer))
+ (let ((proc (async-shell-command command output-buffer error-buffer))
(delete-exited-processes t))
(cl-letf (((symbol-function #'shell-command-sentinel) #'ignore))
(when (stringp input)
(should (= cols async-shell-command-width))))))
(tramp--test--deftest-direct-async-process tramp-test32-shell-command
- "Check direct async `shell-command'.")
+ "Check direct async `shell-command'." 'unstable)
;; This test is inspired by Bug#39067.
(ert-deftest tramp-test32-shell-command-dont-erase-buffer ()
(ignore-errors (delete-directory tmp-name 'recursive))))))
;; (tramp--test--deftest-direct-async-process tramp-test43-asynchronous-requests
-;; "Check parallel direct asynchronous requests.")
+;; "Check parallel direct asynchronous requests." 'unstable)
;; This test is inspired by Bug#29163.
(ert-deftest tramp-test44-auto-load ()