diff options
| author | Michael Albinus <michael.albinus@gmx.de> | 2018-12-21 13:53:20 +0100 |
|---|---|---|
| committer | Michael Albinus <michael.albinus@gmx.de> | 2018-12-21 13:53:20 +0100 |
| commit | 452d0c52cdf9a1ac9fe0df8acff931e9ef94c0a2 (patch) | |
| tree | d2796b275f36e0212fa847ef269523ab5788a503 /test/lisp/filenotify-tests.el | |
| parent | f1faf85f003f6e526f3d7e27dbdd8bf7f151582b (diff) | |
| download | emacs-452d0c52cdf9a1ac9fe0df8acff931e9ef94c0a2.tar.gz | |
Fix Bug#33735
* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter):
Delete empty lines. (Bug#33735)
(tramp-sh-inotifywait-process-filter): Use `string-match'.
(tramp-set-remote-path): Check for PIPE_BUF but PATH_MAX.
* test/lisp/filenotify-tests.el: Handle $REMOTE_FILE_NOTIFY_LIBRARY.
(file-notify--deftest-remote): Suppress vc-handled-backends.
(file-notify-test08-backup): Do not expect failure on hydra.
(Bug#33735).
Diffstat (limited to 'test/lisp/filenotify-tests.el')
| -rw-r--r-- | test/lisp/filenotify-tests.el | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index 51b323f9b47..fb268b45138 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -31,6 +31,21 @@ ;; remote host, set this environment variable to "/dev/null" or ;; whatever is appropriate on your system. +;; For the remote file-notify library, Tramp checks for the existence +;; of a respective command. The first command found is used. In +;; order to use a dedicated one, the environment variable +;; $REMOTE_FILE_NOTIFY_LIBRARY shall be set, possible values are +;; "inotifywait", "gio-monitor" and "gvfs-monitor-dir". + +;; Local file-notify libraries are auto-detected during Emacs +;; configuration. This can be changed with a respective configuration +;; argument, like +;; +;; --with-file-notification=inotify +;; --with-file-notification=kqueue +;; --with-file-notification=gfile +;; --with-file-notification=w32 + ;; A whole test run can be performed calling the command `file-notify-test-all'. ;;; Code: @@ -64,6 +79,12 @@ (format "/mock::%s" temporary-file-directory))) "Temporary directory for Tramp tests.") +;; Filter suppressed remote file-notify libraries. +(when (stringp (getenv "REMOTE_FILE_NOTIFY_LIBRARY")) + (dolist (lib '("inotifywait" "gio-monitor" "gvfs-monitor-dir")) + (unless (string-equal (getenv "REMOTE_FILE_NOTIFY_LIBRARY") lib) + (add-to-list 'tramp-connection-properties `(nil ,lib nil))))) + (defvar file-notify--test-tmpdir nil) (defvar file-notify--test-tmpfile nil) (defvar file-notify--test-tmpfile1 nil) @@ -250,7 +271,8 @@ This returns only for the local case and gfilenotify; otherwise it is nil. (skip-unless (not ,skip)) (let* ((temporary-file-directory file-notify-test-remote-temporary-file-directory) - (ert-test (ert-get-test ',test))) + (ert-test (ert-get-test ',test)) + vc-handled-backends) (skip-unless (file-notify--test-remote-enabled)) (tramp-cleanup-connection (tramp-dissect-file-name temporary-file-directory) nil 'keep-password) @@ -1243,8 +1265,7 @@ delivered." (file-notify--test-cleanup))) (file-notify--deftest-remote file-notify-test08-backup - "Check that backup keeps file notification for remote files." - (if (getenv "EMACS_HYDRA_CI") :failed :passed)) ; fixme bug#33735 + "Check that backup keeps file notification for remote files.") (ert-deftest file-notify-test09-watched-file-in-watched-dir () "Watches a directory and a file in that directory separately. |
