From: Michael Albinus Date: Mon, 7 Jan 2019 13:04:17 +0000 (+0100) Subject: Adapt tests for emba X-Git-Tag: emacs-27.0.90~3861 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=536e6dea0f9302ef69d1bb12d0efc852c630d1ca;p=emacs.git Adapt tests for emba * test/lisp/filenotify-tests.el (file-notify-test03-events) (file-notify-test05-file-validity) (file-notify-test06-dir-validity) (file-notify-test07-many-events) (file-notify-test09-watched-file-in-watched-dir): Adapt tests for emba. --- diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index 4be51afb47f..fdc8d00d86d 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -688,10 +688,9 @@ delivered." '(created deleted stopped)) ((string-equal (file-notify--test-library) "kqueue") '(created changed deleted stopped)) - ;; inotify on emba does not detect `deleted' and - ;; `stopped' events of the directory. - ((and (string-equal (file-notify--test-library) "inotify") - (getenv "EMACS_EMBA_CI")) + ;; On emba, `deleted' and `stopped' events of the + ;; directory are not detected. + ((getenv "EMACS_EMBA_CI") '(created changed deleted)) (t '(created changed deleted deleted stopped))) (write-region @@ -738,10 +737,9 @@ delivered." '(created created changed changed deleted stopped)) ((string-equal (file-notify--test-library) "kqueue") '(created changed created changed deleted stopped)) - ;; inotify on emba does not detect `deleted' and - ;; `stopped' events of the directory. - ((and (string-equal (file-notify--test-library) "inotify") - (getenv "EMACS_EMBA_CI")) + ;; On emba, `deleted' and `stopped' events of the + ;; directory are not detected. + ((getenv "EMACS_EMBA_CI") '(created changed created changed deleted deleted)) (t '(created changed created changed deleted deleted deleted stopped))) @@ -795,10 +793,9 @@ delivered." '(created created deleted deleted stopped)) ((string-equal (file-notify--test-library) "kqueue") '(created changed renamed deleted stopped)) - ;; inotify on emba does not detect `deleted' and - ;; `stopped' events of the directory. - ((and (string-equal (file-notify--test-library) "inotify") - (getenv "EMACS_EMBA_CI")) + ;; On emba, `deleted' and `stopped' events of the + ;; directory are not detected. + ((getenv "EMACS_EMBA_CI") '(created changed renamed deleted)) (t '(created changed renamed deleted deleted stopped))) (write-region @@ -1017,10 +1014,8 @@ delivered." ;; Cleanup. (file-notify--test-cleanup)) - ;; inotify on emba does not detect `deleted' and - ;; `stopped' events of the directory. - (unless (and (string-equal (file-notify--test-library) "inotify") - (getenv "EMACS_EMBA_CI")) + ;; On emba, `deleted' and `stopped' events of the directory are not detected. + (unless (getenv "EMACS_EMBA_CI") (unwind-protect (let ((file-notify--test-tmpdir (make-temp-file "file-notify-test-parent" t))) @@ -1104,10 +1099,8 @@ delivered." ;; Cleanup. (file-notify--test-cleanup)) - ;; inotify on emba does not detect `deleted' and - ;; `stopped' events of the directory. - (unless (and (string-equal (file-notify--test-library) "inotify") - (getenv "EMACS_EMBA_CI")) + ;; On emba, `deleted' and `stopped' events of the directory are not detected. + (unless (getenv "EMACS_EMBA_CI") (unwind-protect (progn (should @@ -1199,8 +1192,7 @@ delivered." (delete-file file))) (delete-directory file-notify--test-tmpfile) (if (or (string-equal (file-notify--test-library) "w32notify") - (and (string-equal (file-notify--test-library) "inotify") - (getenv "EMACS_EMBA_CI"))) + (getenv "EMACS_EMBA_CI")) (file-notify--rm-descriptor file-notify--test-desc)) ;; The environment shall be cleaned up. @@ -1409,20 +1401,17 @@ the file watch." ;; w32notify does not raise `deleted' and `stopped' ;; events for the watched directory. ((string-equal (file-notify--test-library) "w32notify") '()) - ;; inotify on emba does not detect `deleted' and - ;; `stopped' events of the directory. - ((and (string-equal (file-notify--test-library) "inotify") - (getenv "EMACS_EMBA_CI")) + ;; On emba, `deleted' and `stopped' events of the + ;; directory are not detected. + ((getenv "EMACS_EMBA_CI") '()) (t '(deleted stopped)))))) (delete-directory file-notify--test-tmpfile 'recursive)) - (unless (and (string-equal (file-notify--test-library) "inotify") - (getenv "EMACS_EMBA_CI")) + (unless (getenv "EMACS_EMBA_CI") (should-not (file-notify-valid-p file-notify--test-desc1)) (should-not (file-notify-valid-p file-notify--test-desc2))) (when (or (string-equal (file-notify--test-library) "w32notify") - (and (string-equal (file-notify--test-library) "inotify") - (getenv "EMACS_EMBA_CI"))) + (getenv "EMACS_EMBA_CI")) (file-notify--rm-descriptor file-notify--test-desc1) (file-notify--rm-descriptor file-notify--test-desc2))