[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trunk r113641: * test/automated/file-notify-tests.el (file-notify--t
From: |
Michael Albinus |
Subject: |
Re: trunk r113641: * test/automated/file-notify-tests.el (file-notify--test-remote-enabled): |
Date: |
Fri, 02 Aug 2013 08:47:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Glenn Morris <address@hidden> writes:
Hi Glenn,
> === modified file 'test/automated/file-notify-tests.el'
> --- a/test/automated/file-notify-tests.el 2013-07-24 13:56:19 +0000
> +++ b/test/automated/file-notify-tests.el 2013-08-01 23:10:51 +0000
> @@ -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 address@hidden,
> + ;; 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."
I fear this is not sufficient. This patch handles only file
notifications which are implemented via tramp-sh.el.
Yesterday, I have committed a patch which adds
`tramp-gvfs-handle-file-notify-add-watch' (using gvfs-monitor-file to
poll for changes on GVFS mounted directories).
Maybe we rethink to introduce `file-notify-supported-p' and its
handlers?
Best regards, Michael.
PS: Don't worry when I do not react next days. Tomorrow I'll start a
bike tour, and unfortunately my companions insist on the basic rule "no
electronic devices on board".
- Re: trunk r113641: * test/automated/file-notify-tests.el (file-notify--test-remote-enabled):,
Michael Albinus <=