emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116173: * automated/file-notify-tests.el (file-noti


From: Michael Albinus
Subject: [Emacs-diffs] trunk r116173: * automated/file-notify-tests.el (file-notify--deftest-remote):
Date: Mon, 27 Jan 2014 19:10:08 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116173
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2014-01-27 20:10:02 +0100
message:
  * 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'.
modified:
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
  test/automated/file-notify-tests.el 
filenotifytests.el-20130702144123-sxglvo6zs3jcj8w1-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2014-01-26 16:20:13 +0000
+++ b/test/ChangeLog    2014-01-27 19:10:02 +0000
@@ -1,3 +1,13 @@
+2014-01-27  Michael Albinus  <address@hidden>
+
+       * 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  <address@hidden>
 
        * automated/file-notify-tests.el (file-notify-test02-events):

=== modified file 'test/automated/file-notify-tests.el'
--- a/test/automated/file-notify-tests.el       2014-01-26 16:29:50 +0000
+++ b/test/automated/file-notify-tests.el       2014-01-27 19:10:02 +0000
@@ -102,11 +102,6 @@
             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 @@
 
 (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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]