]> git.eshelyaron.com Git - emacs.git/commitdiff
* automated/file-notify-tests.el (file-notify--deftest-remote):
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 27 Jan 2014 19:10:02 +0000 (20:10 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 27 Jan 2014 19:10:02 +0000 (20:10 +0100)
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'.

test/ChangeLog
test/automated/file-notify-tests.el

index d09d9e524a36d53e45607f06f83b653e0e30c089..50ffd7c395700f7a5dd9a6eae70599975ac7df11 100644 (file)
@@ -1,3 +1,13 @@
+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):
index 242a813f03440bf9b78fe7987d029a9b3b079cfb..e92595f0ec6f85a9527719f58ad0dc2da74f0d17 100644 (file)
@@ -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))