Commit a99a3542 authored by Michael Albinus's avatar Michael Albinus

; Instrument `tramp--test-shell-command-to-string-asynchronously'

parent a18336a8
Pipeline #1337 failed with stage
in 52 minutes and 28 seconds
......@@ -4085,11 +4085,15 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(defun tramp--test-shell-command-to-string-asynchronously (command)
"Like `shell-command-to-string', but for asynchronous processes."
(with-temp-buffer
(async-shell-command command (current-buffer))
(with-timeout
((if (getenv "EMACS_EMBA_CI") 30 10) (tramp--test-timeout-handler))
(while (accept-process-output
(get-buffer-process (current-buffer)) nil nil t)))
(unwind-protect
(async-shell-command command (current-buffer))
(with-timeout
((if (getenv "EMACS_EMBA_CI") 30 10) (tramp--test-timeout-handler))
(while (accept-process-output
(get-buffer-process (current-buffer)) nil nil t)))
(tramp--test-message
"# %s\n%s"
command (buffer-substring-no-properties (point-min) (point-max))))
(buffer-substring-no-properties (point-min) (point-max))))
(ert-deftest tramp-test32-shell-command ()
......@@ -4189,7 +4193,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(ignore-errors (delete-file tmp-name)))
;; Test `shell-command-width' of `async-shell-command'.
;; `executable-find' has changed the number of parameters in
;; Emacs 27.1, so we use `apply' for older Emacsen.
(when (and (executable-find "tput")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment