* test/automated/file-notify-tests.el (file-notify--test-remote-enabled):

Try to check that the remote system has a notification program.
This commit is contained in:
Glenn Morris 2013-08-01 19:10:51 -04:00
parent 89cccc2f3d
commit 7d7e9a7314
2 changed files with 18 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-08-01 Glenn Morris <rgm@gnu.org>
* automated/file-notify-tests.el (file-notify--test-remote-enabled):
Try to check that the remote system has a notification program.
2013-07-31 Glenn Morris <rgm@gnu.org>
* automated/undo-tests.el (undo-test2, undo-test5): Be quieter.

View file

@ -43,6 +43,7 @@
(defvar file-notify--test-event nil)
(require 'tramp)
(require 'tramp-sh)
(setq tramp-verbose 0
tramp-message-show-message nil)
(when noninteractive (defalias 'tramp-read-passwd 'ignore))
@ -57,7 +58,18 @@
(ignore-errors
(and (file-remote-p file-notify-test-remote-temporary-file-directory)
(file-directory-p file-notify-test-remote-temporary-file-directory)
(file-writable-p file-notify-test-remote-temporary-file-directory))))
(file-writable-p file-notify-test-remote-temporary-file-directory)
;; Extracted from tramp-sh-handle-file-notify-add-watch.
;; Even though the "remote" system is just ssh@localhost,
;; the PATH might not be the same as the "local" PATH.
;; Eg this seems to be the case on hydra.nixos.org.
;; Without this, tests fail with:
;; "No file notification program found on /ssh:localhost:"
;; Try to fix PATH instead?
(with-parsed-tramp-file-name
file-notify-test-remote-temporary-file-directory nil
(or (tramp-get-remote-gvfs-monitor-dir v)
(tramp-get-remote-inotifywait v))))))
(defmacro file-notify--deftest-remote (test docstring)
"Define ert `TEST-remote' for remote files."