aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2019-04-04 13:41:53 +0200
committerMichael Albinus2019-04-04 13:41:53 +0200
commit18c02f7e078ae574d03ec67939c4755ce3554fb2 (patch)
tree38f8dc91ae7555269dfe90bd79e99250d0598f66
parent5e55b1b82952a03b704c464e8086d3c41e993a46 (diff)
downloademacs-18c02f7e078ae574d03ec67939c4755ce3554fb2.tar.gz
emacs-18c02f7e078ae574d03ec67939c4755ce3554fb2.zip
* test/lisp/net/tramp-tests.el (tramp-test43-asynchronous-requests):
Make it fit for tramp-adb. Apply better check in process filter.
-rw-r--r--test/lisp/net/tramp-tests.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 1ee11f0d38a..96e4438ec11 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3923,6 +3923,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
3923 :tags '(:expensive-test) 3923 :tags '(:expensive-test)
3924 (skip-unless (tramp--test-enabled)) 3924 (skip-unless (tramp--test-enabled))
3925 (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) 3925 (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)))
3926 ;; `make-process' supports file name handlers since Emacs 27.
3926 (skip-unless (tramp--test-emacs27-p)) 3927 (skip-unless (tramp--test-emacs27-p))
3927 3928
3928 (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) 3929 (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
@@ -5362,20 +5363,14 @@ process sentinels. They shall not disturb each other."
5362 ;; we mark it as unstable. 5363 ;; we mark it as unstable.
5363 :tags '(:expensive-test :unstable) 5364 :tags '(:expensive-test :unstable)
5364 (skip-unless (tramp--test-enabled)) 5365 (skip-unless (tramp--test-enabled))
5365 (skip-unless (tramp--test-sh-p)) 5366 (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)))
5366 ;; This test is sensible wrt to other running tests. Let it work
5367 ;; only if it is the only selected test.
5368 ;; FIXME: There must be a better solution.
5369 (skip-unless
5370 (= 1 (length
5371 (ert-select-tests (ert--stats-selector ert--current-run-stats) t))))
5372 5367
5373 (with-timeout 5368 (with-timeout
5374 (tramp--test-asynchronous-requests-timeout (tramp--test-timeout-handler)) 5369 (tramp--test-asynchronous-requests-timeout (tramp--test-timeout-handler))
5375 (define-key special-event-map [sigusr1] #'tramp--test-timeout-handler) 5370 (define-key special-event-map [sigusr1] #'tramp--test-timeout-handler)
5376 (let* (;; For the watchdog. 5371 (let* (;; For the watchdog.
5377 (default-directory (expand-file-name temporary-file-directory)) 5372 (default-directory (expand-file-name temporary-file-directory))
5378 (shell-file-name "/bin/sh") 5373 (shell-file-name (if (tramp--test-adb-p) "/system/bin/sh" "/bin/sh"))
5379 (watchdog 5374 (watchdog
5380 (start-process-shell-command 5375 (start-process-shell-command
5381 "*watchdog*" nil 5376 "*watchdog*" nil
@@ -5475,7 +5470,7 @@ process sentinels. They shall not disturb each other."
5475 "Process filter %s %s %s" proc string (current-time-string)) 5470 "Process filter %s %s %s" proc string (current-time-string))
5476 (with-current-buffer (process-buffer proc) 5471 (with-current-buffer (process-buffer proc)
5477 (insert string)) 5472 (insert string))
5478 (unless (zerop (length string)) 5473 (when (< (process-get proc 'bar) 2)
5479 (dired-uncache (process-get proc 'foo)) 5474 (dired-uncache (process-get proc 'foo))
5480 (should (file-attributes (process-get proc 'foo)))))) 5475 (should (file-attributes (process-get proc 'foo))))))
5481 ;; Add process sentinel. It shall not perform remote 5476 ;; Add process sentinel. It shall not perform remote
@@ -5528,7 +5523,12 @@ process sentinels. They shall not disturb each other."
5528 (dolist (buf buffers) 5523 (dolist (buf buffers)
5529 (with-current-buffer buf 5524 (with-current-buffer buf
5530 (should 5525 (should
5531 (string-equal (format "%s\n%s\n" buf buf) (buffer-string))))) 5526 (string-equal
5527 ;; tramp-adb.el echoes, so we must add the three strings.
5528 (if (tramp--test-adb-p)
5529 (format "%s\n%s\n%s\n%s\n%s\n" buf buf buf buf buf)
5530 (format "%s\n%s\n" buf buf))
5531 (buffer-string)))))
5532 (should-not 5532 (should-not
5533 (directory-files 5533 (directory-files
5534 tmp-name nil directory-files-no-dot-files-regexp))) 5534 tmp-name nil directory-files-no-dot-files-regexp)))
@@ -5729,8 +5729,8 @@ Since it unloads Tramp, it shall be the last test to run."
5729;; do not work properly for `nextcloud'. 5729;; do not work properly for `nextcloud'.
5730;; * Fix `tramp-test29-start-file-process' and 5730;; * Fix `tramp-test29-start-file-process' and
5731;; `tramp-test30-make-process' on MS Windows (`process-send-eof'?). 5731;; `tramp-test30-make-process' on MS Windows (`process-send-eof'?).
5732;; * Fix Bug#16928 in `tramp-test43-asynchronous-requests'. 5732;; * Fix Bug#16928 in `tramp-test43-asynchronous-requests'. Looks
5733;; * Fix `tramp-test44-threads'. 5733;; like it is resolved now. Remove `:unstable' tag?
5734 5734
5735(provide 'tramp-tests) 5735(provide 'tramp-tests)
5736;;; tramp-tests.el ends here 5736;;; tramp-tests.el ends here