mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
; Instrument file-notify-test07-many-events
* test/lisp/filenotify-tests.el (file-notify--test-monitor): Improve instrumentation.
This commit is contained in:
parent
bea8b09568
commit
c16b0d9af3
1 changed files with 32 additions and 30 deletions
|
|
@ -256,7 +256,7 @@ must be a valid watch descriptor."
|
|||
;; - GPollFileMonitor (gio on cygwin)
|
||||
;; - SMBSamba (smb-notify on Samba server)
|
||||
;; - SMBWindows (smb-notify on MS Windows).
|
||||
(when file-notify--test-desc
|
||||
(if file-notify--test-desc
|
||||
(or (alist-get file-notify--test-desc file-notify--test-monitors)
|
||||
(when (member
|
||||
(file-notify--test-library) '("gfilenotify" "gio" "smb-notify"))
|
||||
|
|
@ -266,7 +266,8 @@ must be a valid watch descriptor."
|
|||
(if (file-remote-p file-notify--test-rootdir)
|
||||
;; `file-notify--test-desc' is the connection process.
|
||||
(progn
|
||||
(while (and (process-live-p file-notify--test-desc)
|
||||
(while
|
||||
(and (process-live-p file-notify--test-desc)
|
||||
(not (tramp-connection-property-p
|
||||
file-notify--test-desc "file-monitor")))
|
||||
(accept-process-output file-notify--test-desc 0))
|
||||
|
|
@ -278,7 +279,8 @@ must be a valid watch descriptor."
|
|||
;; test will fail. We skip it.
|
||||
(unless (alist-get file-notify--test-desc file-notify--test-monitors)
|
||||
(ert-skip "Cannot determine test monitor")))
|
||||
(alist-get file-notify--test-desc file-notify--test-monitors))))
|
||||
(alist-get file-notify--test-desc file-notify--test-monitors))
|
||||
(ert-skip "`file-notify--test-desc' is nil when checking for test monitor")))
|
||||
|
||||
(defmacro file-notify--deftest-remote (test docstring &optional unstable)
|
||||
"Define ert `TEST-remote' for remote files.
|
||||
|
|
@ -1168,18 +1170,18 @@ delivered."
|
|||
:tags '(:expensive-test)
|
||||
(skip-unless (file-notify--test-local-enabled))
|
||||
|
||||
(let ((file-notify-debug ;; Temporarily.
|
||||
(or file-notify-debug
|
||||
(and (getenv "EMACS_EMBA_CI")
|
||||
(string-equal (file-notify--test-library) "gio")
|
||||
(eq (file-notify--test-monitor) 'GInotifyFileMonitor)))))
|
||||
(with-file-notify-test
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify--test-add-watch
|
||||
file-notify--test-tmpdir
|
||||
'(change) #'file-notify--test-event-handler)))
|
||||
(let ((n 10);00)
|
||||
(let ((file-notify-debug ;; Temporarily.
|
||||
(or file-notify-debug
|
||||
(and (getenv "EMACS_EMBA_CI")
|
||||
(string-equal (file-notify--test-library) "gio")
|
||||
(eq (file-notify--test-monitor) 'GInotifyFileMonitor))))
|
||||
(n 10);00)
|
||||
source-file-list target-file-list
|
||||
(default-directory file-notify--test-tmpdir))
|
||||
(dotimes (i n)
|
||||
|
|
@ -1244,7 +1246,7 @@ delivered."
|
|||
(file-notify--rm-descriptor file-notify--test-desc)
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p)))))
|
||||
(file-notify--test-cleanup-p))))
|
||||
|
||||
(file-notify--deftest-remote file-notify-test07-many-events
|
||||
"Check that events are not dropped for remote directories.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue