From: Michael Albinus Date: Mon, 27 Jan 2014 19:10:02 +0000 (+0100) Subject: * automated/file-notify-tests.el (file-notify--deftest-remote): X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~241^2~21 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dc9c8c62df5c2d2c4d42a8f658dae854df74662e;p=emacs.git * 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'. --- diff --git a/test/ChangeLog b/test/ChangeLog index d09d9e524a3..50ffd7c3957 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,13 @@ +2014-01-27 Michael Albinus + + * 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 * automated/file-notify-tests.el (file-notify-test02-events): diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index 242a813f034..e92595f0ec6 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el @@ -102,11 +102,6 @@ being the result.") 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))))) @@ -189,20 +184,18 @@ Save the result in `file-notify--test-results', for later analysis." (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))