aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-08-01 19:10:51 -0400
committerGlenn Morris2013-08-01 19:10:51 -0400
commit7d7e9a7314a07a690f19ad4baff93e99445db005 (patch)
tree71d846a9cf2a9afb31ca6c0c71291552b4999c6d
parent89cccc2f3dc32af8e3cb047edb9c2d4df55ca962 (diff)
downloademacs-7d7e9a7314a07a690f19ad4baff93e99445db005.tar.gz
emacs-7d7e9a7314a07a690f19ad4baff93e99445db005.zip
* test/automated/file-notify-tests.el (file-notify--test-remote-enabled):
Try to check that the remote system has a notification program.
-rw-r--r--test/ChangeLog5
-rw-r--r--test/automated/file-notify-tests.el14
2 files changed, 18 insertions, 1 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index f7d66fc1cef..1efd86545aa 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
12013-08-01 Glenn Morris <rgm@gnu.org>
2
3 * automated/file-notify-tests.el (file-notify--test-remote-enabled):
4 Try to check that the remote system has a notification program.
5
12013-07-31 Glenn Morris <rgm@gnu.org> 62013-07-31 Glenn Morris <rgm@gnu.org>
2 7
3 * automated/undo-tests.el (undo-test2, undo-test5): Be quieter. 8 * automated/undo-tests.el (undo-test2, undo-test5): Be quieter.
diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el
index 8bd4f258b1c..9f552ee7ab1 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -43,6 +43,7 @@
43(defvar file-notify--test-event nil) 43(defvar file-notify--test-event nil)
44 44
45(require 'tramp) 45(require 'tramp)
46(require 'tramp-sh)
46(setq tramp-verbose 0 47(setq tramp-verbose 0
47 tramp-message-show-message nil) 48 tramp-message-show-message nil)
48(when noninteractive (defalias 'tramp-read-passwd 'ignore)) 49(when noninteractive (defalias 'tramp-read-passwd 'ignore))
@@ -57,7 +58,18 @@
57 (ignore-errors 58 (ignore-errors
58 (and (file-remote-p file-notify-test-remote-temporary-file-directory) 59 (and (file-remote-p file-notify-test-remote-temporary-file-directory)
59 (file-directory-p file-notify-test-remote-temporary-file-directory) 60 (file-directory-p file-notify-test-remote-temporary-file-directory)
60 (file-writable-p file-notify-test-remote-temporary-file-directory)))) 61 (file-writable-p file-notify-test-remote-temporary-file-directory)
62 ;; Extracted from tramp-sh-handle-file-notify-add-watch.
63 ;; Even though the "remote" system is just ssh@localhost,
64 ;; the PATH might not be the same as the "local" PATH.
65 ;; Eg this seems to be the case on hydra.nixos.org.
66 ;; Without this, tests fail with:
67 ;; "No file notification program found on /ssh:localhost:"
68 ;; Try to fix PATH instead?
69 (with-parsed-tramp-file-name
70 file-notify-test-remote-temporary-file-directory nil
71 (or (tramp-get-remote-gvfs-monitor-dir v)
72 (tramp-get-remote-inotifywait v))))))
61 73
62(defmacro file-notify--deftest-remote (test docstring) 74(defmacro file-notify--deftest-remote (test docstring)
63 "Define ert `TEST-remote' for remote files." 75 "Define ert `TEST-remote' for remote files."