Re: emacs-31 76846eede34: Delete test that hangs

Sean Whitton <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
Juri, Martin, please try to fix this on the emacs-31 branch but only
after I've made the 31.1 release.

Revert this commit of mine with "do not merge to master", then push a
regular commit fixing it, if you can.

Thanks.

Sean Whitton [24/Aug  5:05am -04] wrote:
> branch: emacs-31
> commit 76846eede34ea7bc7b8bbe4183ed070783e11d6b
> Author: Sean Whitton <[email protected]>
> Commit: Sean Whitton <[email protected]>
>
>     Delete test that hangs
>     
>     * test/lisp/tab-bar-tests.el
>     (tab-bar-tests-quit-restore-window): Delete test that hangs, for
>     the Emacs 31.1 release.  Do not merge to master.
> ---
>  test/lisp/tab-bar-tests.el | 142 ---------------------------------------------
>  1 file changed, 142 deletions(-)
>
> diff --git a/test/lisp/tab-bar-tests.el b/test/lisp/tab-bar-tests.el
> index e0de25bdc39..d48c23b27f4 100644
> --- a/test/lisp/tab-bar-tests.el
> +++ b/test/lisp/tab-bar-tests.el
> @@ -51,147 +51,5 @@
>    ;; Clean up tabs afterwards
>    (tab-bar-tabs-set nil))
>  
> -(ert-deftest tab-bar-tests-quit-restore-window ()
> -  (skip-when (pcase system-type
> -               ;; Skip test on MS-Windows in batch mode, since terminal
> -               ;; frames cannot be created in that case.
> -               ('windows-nt noninteractive)
> -               ;; This test is unreliable on macOS when run in batch mode
> -               ;; from Emacs (M-x compile).
> -               ('darwin (equal (getenv "TERM") "dumb"))
> -               ;; Emba runs the container without "--tty"
> -               ;; (the environment variable "TERM" is nil), and this
> -               ;; test fails with '(error "Could not open file: /dev/tty")'.
> -               ;; Therefore skip it unless it can use '(tty-type . "linux")'.
> -               ('gnu/linux (null (getenv "TERM")))))
> -
> -  (let* ((frame-params (when noninteractive
> -                         '((window-system . nil)
> -                           (tty-type . "linux"))))
> -         (pop-up-frame-alist frame-params)
> -         (frame-auto-hide-function 'delete-frame))
> -
> -    ;; After commit 293eaf323a0 (bug#81575) 'frame-deletable-p'
> -    ;; checks if frames are on the same terminal.  But in this test
> -    ;; the first frame F1 is on initial_terminal, but other created
> -    ;; frames are on #<terminal 1 on /dev/tty>.  So create a new frame
> -    ;; on the same terminal as other created frames, and delete
> -    ;; the initial frame that is on another terminal.
> -    (make-frame pop-up-frame-alist)
> -    (delete-frame (car (last (frame-list))) nil)
> -
> -    ;; 1.1. 'quit-restore-window' should delete the frame
> -    ;; from initial window (bug#59862)
> -    (progn
> -      (should (eq (length (frame-list)) 1))
> -      (other-frame-prefix)
> -      (info)
> -      (should (eq (length (frame-list)) 2))
> -      (should (equal (buffer-name) "*info*"))
> -      (view-echo-area-messages)
> -      (other-window 1)
> -      (should (eq (length (window-list)) 2))
> -      (should (equal (buffer-name) "*Messages*"))
> -      (quit-window)
> -      (should (eq (length (window-list)) 1))
> -      (should (equal (buffer-name) "*info*"))
> -      (quit-window)
> -      (should (eq (length (frame-list)) 1)))
> -
> -    ;; 1.2. 'quit-restore-window' should not delete the frame
> -    ;; from non-initial window (bug#59862)
> -    (progn
> -      (should (eq (length (frame-list)) 1))
> -      (other-frame-prefix)
> -      (info)
> -      (should (eq (length (frame-list)) 2))
> -      (should (equal (buffer-name) "*info*"))
> -      (view-echo-area-messages)
> -      (should (eq (length (window-list)) 2))
> -      (should (equal (buffer-name) "*info*"))
> -      (quit-window)
> -      (should (eq (length (window-list)) 1))
> -      (should (eq (length (frame-list)) 2))
> -      (should (equal (buffer-name) "*Messages*"))
> -      (quit-window)
> -      (should (eq (length (frame-list)) 2))
> -      ;; Delete the created frame afterwards because with tty frames
> -      ;; the output of 'message' is bound to the original frame
> -      (delete-frame (car (frame-list))))
> -
> -    ;; 2.1. 'quit-restore-window' should close the tab
> -    ;; from initial window (bug#59862)
> -    (progn
> -      (should (eq (length (tab-bar-tabs)) 1))
> -      (other-tab-prefix)
> -      (info)
> -      (should (eq (length (tab-bar-tabs)) 2))
> -      (should (equal (buffer-name) "*info*"))
> -      (view-echo-area-messages)
> -      (other-window 1)
> -      (should (eq (length (window-list)) 2))
> -      (should (equal (buffer-name) "*Messages*"))
> -      (quit-window)
> -      (should (eq (length (window-list)) 1))
> -      (should (equal (buffer-name) "*info*"))
> -      (quit-window)
> -      (should (eq (length (tab-bar-tabs)) 1)))
> -
> -    ;; 2.2. 'quit-restore-window' should not close the tab
> -    ;; from non-initial window (bug#59862)
> -    (progn
> -      (should (eq (length (tab-bar-tabs)) 1))
> -      (other-tab-prefix)
> -      (info)
> -      (should (eq (length (tab-bar-tabs)) 2))
> -      (should (equal (buffer-name) "*info*"))
> -      (view-echo-area-messages)
> -      (should (eq (length (window-list)) 2))
> -      (should (equal (buffer-name) "*info*"))
> -      (quit-window)
> -      (should (eq (length (window-list)) 1))
> -      (should (eq (length (tab-bar-tabs)) 2))
> -      (should (equal (buffer-name) "*Messages*"))
> -      (quit-window)
> -      (should (eq (length (tab-bar-tabs)) 2))
> -      ;; Clean up the tab afterwards
> -      (tab-close))
> -
> -    ;; 3.1. Don't delete the frame with dedicated window
> -    ;; from the second tab (bug#71386)
> -    (with-selected-frame (make-frame frame-params)
> -      (switch-to-buffer (generate-new-buffer "test1"))
> -      (tab-new)
> -      (switch-to-buffer (generate-new-buffer "test2"))
> -      (set-window-dedicated-p (selected-window) t)
> -      (kill-buffer)
> -      (should (eq (length (frame-list)) 2))
> -      (should (eq (length (tab-bar-tabs)) 1))
> -      ;; But now should delete the frame with dedicated window
> -      ;; from the last tab
> -      (set-window-dedicated-p (selected-window) t)
> -      (kill-buffer)
> -      (should (eq (length (frame-list)) 1)))
> -
> -    ;; 3.2. Don't delete the frame with an effectively-dedicated window
> -    ;; from the second tab (bug#71386)
> -    (with-selected-frame (make-frame frame-params)
> -      (let ((switch-to-prev-buffer-skip #'always)
> -            (kill-buffer-quit-windows nil))
> -        (switch-to-buffer (generate-new-buffer "test1"))
> -        (tab-bar-new-tab)
> -        (switch-to-buffer (generate-new-buffer "test2"))
> -        ;; This makes the window effectively dedicated.
> -        (set-window-prev-buffers nil nil)
> -        ;; Killing the buffer should close the tab, leave one open tab,
> -        ;; and not delete the frame.
> -        (kill-buffer)
> -        (should (eq (length (tab-bar-tabs)) 1))
> -        (should (eq (length (frame-list)) 2))
> -        (delete-frame))))
> -
> -  ;; Clean up tabs afterwards
> -  (tab-bar-tabs-set nil))
> -
>  (provide 'tab-bar-tests)
>  ;;; tab-bar-tests.el ends here
>

-- 
Sean Whitton
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.