Subject: bug#79056: tab-bar-tests-quit-restore-window sometimes fails in *compilation* buffer

From: Juri Linkov <[email-masked]>
Date: Wed, 23 Jul 2025 09:51:22 +0300

>> > +  (skip-when (or noninteractive (null (getenv "TERM"))))
>> 
>> If there is no reliable way to create terminal frames in noninteractive
>> tests, then probably such tests should be skipped by default to be used
>> only manually when someone will remember to run them periodically.
>
> Why not allow them in interactive runs, as the patch above does?

What are interactive runs?

Maybe I'm missing something, but I see two distinctions:

1. automatic tests that run on EMBA
2. manual tests that are invoked locally by e.g. `make -C test tab-bar-tests`

1. noninteractive tests that run without term or a connection to the X display
2. interactive tests that can create X frames, etc.

Automatic tests on EMBA can't be interactive without headless mode.
So what remains to do is to manually run interactive tests locally.
But IIUC `make -C test tab-bar-tests` is noninteractive.
And I don't know what command line could run them interactively,
so that tests could pop up X frames, etc.

>> PS: Many web browsers support headless mode that is used in test automation.
>> I wonder how it would be possible to implement headless mode in Emacs?
>
> It should be possible, if someone writes the headless back-end for the
> display engine, akin to xterm.c+xfns.c for X, just much simpler.

Probably in such headless mode X calls can be replaced with stubs or mocks
unless they are stateful.