diff options
| author | Ken Brown | 2017-05-08 15:11:23 -0400 |
|---|---|---|
| committer | Ken Brown | 2017-05-08 15:11:23 -0400 |
| commit | 5e2cf8c804fe5fb3f97e0d777c0e0d8efd00b89a (patch) | |
| tree | 605c4a63484e19a0d995dd222f61f4d41325b92d | |
| parent | 7ff7624a7aa62f30cabf14744e182e9ea6156290 (diff) | |
| download | emacs-5e2cf8c804fe5fb3f97e0d777c0e0d8efd00b89a.tar.gz emacs-5e2cf8c804fe5fb3f97e0d777c0e0d8efd00b89a.zip | |
Skip a test from filenotify-tests.el on Cygwin
* test/lisp/filenotify-tests.el (file-notify-test02-rm-watch):
Skip the last part of the test on Cygwin; it fails due to timing
issues.
(file-notify--test-read-event): Remove `sit-for' that was added
for Cygwin.
| -rw-r--r-- | test/lisp/filenotify-tests.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index 78a68f21bd1..8a31c2cd8b5 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el | |||
| @@ -69,7 +69,6 @@ | |||
| 69 | (defun file-notify--test-read-event () | 69 | (defun file-notify--test-read-event () |
| 70 | "Read one event. | 70 | "Read one event. |
| 71 | There are different timeouts for local and remote file notification libraries." | 71 | There are different timeouts for local and remote file notification libraries." |
| 72 | (sit-for 0.001 'nodisp) | ||
| 73 | (read-event | 72 | (read-event |
| 74 | nil nil | 73 | nil nil |
| 75 | (cond | 74 | (cond |
| @@ -405,7 +404,11 @@ This returns only for the local case and gfilenotify; otherwise it is nil. | |||
| 405 | (file-notify--test-cleanup)) | 404 | (file-notify--test-cleanup)) |
| 406 | 405 | ||
| 407 | (unwind-protect | 406 | (unwind-protect |
| 408 | ;; Check, that removing watch descriptors out of order do not harm. | 407 | ;; Check, that removing watch descriptors out of order do not |
| 408 | ;; harm. This fails on Cygwin because of timing issues unless a | ||
| 409 | ;; long `sit-for' is added before the call to | ||
| 410 | ;; `file-notify--test-read-event'. | ||
| 411 | (if (not (eq system-type 'cygwin)) | ||
| 409 | (let (results) | 412 | (let (results) |
| 410 | (cl-flet ((first-callback (event) | 413 | (cl-flet ((first-callback (event) |
| 411 | (when (eq (nth 1 event) 'deleted) (push 1 results))) | 414 | (when (eq (nth 1 event) 'deleted) (push 1 results))) |
| @@ -434,7 +437,7 @@ This returns only for the local case and gfilenotify; otherwise it is nil. | |||
| 434 | (should (equal results (list 2))) | 437 | (should (equal results (list 2))) |
| 435 | 438 | ||
| 436 | ;; The environment shall be cleaned up. | 439 | ;; The environment shall be cleaned up. |
| 437 | (file-notify--test-cleanup-p))) | 440 | (file-notify--test-cleanup-p)))) |
| 438 | 441 | ||
| 439 | ;; Cleanup. | 442 | ;; Cleanup. |
| 440 | (file-notify--test-cleanup))) | 443 | (file-notify--test-cleanup))) |