+2014-01-27 Michael Albinus <michael.albinus@gmx.de>
+
+ * automated/file-notify-tests.el (file-notify--deftest-remote):
+ Do not skip when the local test has failed. They are unrelated.
+ (file-notify--wait-for-events): Use `sit-for'. Let-bind
+ `noninteractive' to nil, otherwise `sit-for' could be degraded to
+ `sleep-for'.
+ (file-notify-test02-events): Check for `file-remote-p' instead of
+ `file-notify--test-remote-enabled'.
+
2014-01-26 Michael Albinus <michael.albinus@gmx.de>
* automated/file-notify-tests.el (file-notify-test02-events):
file-notify-test-remote-temporary-file-directory)
(ert-test (ert-get-test ',test)))
(skip-unless (file-notify--test-remote-enabled))
- ;; The local test could have passed, skipped, or quit. All of
- ;; these results should not prevent us to run the remote test.
- ;; That's why we skip only for failed local tests.
- (skip-unless
- (not (ert-test-failed-p (ert-test-most-recent-result ert-test))))
(tramp-cleanup-connection
(tramp-dissect-file-name temporary-file-directory) nil 'keep-password)
(funcall (ert-test-body ert-test)))))
(defmacro file-notify--wait-for-events (timeout until)
"Wait for file notification events until form UNTIL is true.
-TIMEOUT is the maximum time to wait for."
+TIMEOUT is the maximum time to wait for, in seconds."
`(with-timeout (,timeout (ignore))
(while (null ,until)
- ;; glib events, and remote events.
- (accept-process-output nil 0.1)
- ;; inotify events.
- (read-event nil nil 0.1))))
+ (let (noninteractive)
+ (sit-for 0.1 'nodisplay)))))
(ert-deftest file-notify-test02-events ()
"Check file creation/removal notifications."
;; Bug#16519.
:expected-result
(if (and noninteractive
- (not (file-notify--test-remote-enabled))
+ (not (file-remote-p temporary-file-directory))
(memq file-notify--library '(gfilenotify w32notify)))
:failed :passed)
(skip-unless (file-notify--test-local-enabled))