emacs-diffs
[Top][All Lists]
Advanced

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

master f58d01e01e0: Skip hanging tests on Cygwin (bug#65325)


From: Ken Brown
Subject: master f58d01e01e0: Skip hanging tests on Cygwin (bug#65325)
Date: Sat, 19 Aug 2023 16:56:54 -0400 (EDT)

branch: master
commit f58d01e01e095b18a9c64c0bab3acd79fd4ba96f
Author: Ken Brown <kbrown@cornell.edu>
Commit: Ken Brown <kbrown@cornell.edu>

    Skip hanging tests on Cygwin (bug#65325)
    
    * test/lisp/server-tests.el (server-tests/can-create-frames-p):
    Define to be nil on Cygwin unless Emacs has at least one of the
    features gfilenotify, dbus, or threads.  This causes three tests
    to be skipped.
    
    * test/src/keyboard-tests.el (keyboard-unread-command-events):
    Skip on Cygwin unless Emacs has at least one of the features
    gfilenotify, dbus, or threads.
---
 test/lisp/server-tests.el  | 12 +++++++++---
 test/src/keyboard-tests.el |  5 +++++
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/test/lisp/server-tests.el b/test/lisp/server-tests.el
index ffafa74925f..de1aa80c272 100644
--- a/test/lisp/server-tests.el
+++ b/test/lisp/server-tests.el
@@ -25,12 +25,18 @@
 
 (defconst server-tests/can-create-frames-p
   (and (not (memq system-type '(windows-nt ms-dos)))
-       (not (member (getenv "TERM") '("dumb" "" nil))))
+       (not (member (getenv "TERM") '("dumb" "" nil)))
+       (or (not (eq system-type 'cygwin))
+           (featurep 'gfilenotify)
+           (featurep 'dbus)
+           (featurep 'threads)))
   "Non-nil if we can create a new frame in the tests.
 Some tests below need to create new frames for the emacsclient.
 However, this doesn't work on all platforms.  In particular,
-MS-Windows fails to create frames from a batch Emacs session.  In
-cases like that, we just skip the test.")
+MS-Windows fails to create frames from a batch Emacs session.
+The same is true on Cygwin unless Emacs has at least one of the
+features gfilenotify, dbus, or threads (bug#65325).  In cases
+like that, we just skip the test.")
 
 (defconst server-tests/max-wait-time 5
   "The maximum time to wait in `server-tests/wait-until', in seconds.")
diff --git a/test/src/keyboard-tests.el b/test/src/keyboard-tests.el
index 3393c1d9018..bbb9c19e2e7 100644
--- a/test/src/keyboard-tests.el
+++ b/test/src/keyboard-tests.el
@@ -23,6 +23,11 @@
 
 (ert-deftest keyboard-unread-command-events ()
   "Test `unread-command-events'."
+  ;; Avoid hang on Cygwin; see bug#65325.
+  (skip-unless (or (not (eq system-type 'cygwin))
+                   (featurep 'gfilenotify)
+                   (featurep 'dbus)
+                   (featurep 'threads)))
   (let ((unread-command-events nil))
     (should (equal (progn (push ?\C-a unread-command-events)
                           (read-event nil nil 1))



reply via email to

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