fix: close an idle interface past its first screen

RETROBIOS_IDLE_EXIT only counted while the first screen was up. Given
--platform, the check runs and the plan follows without a key, so the
close never came. It now counts from the end of the last run, as long as
no key has been pressed.
This commit is contained in:
Abdessamad Derraz committed 2026-10-23 22:07:31 +02:00
1 parent 89cfaeef5e
commit b26ce7cbdc
3 files changed
+31 -12

No files matched your search

+12
View File
@@ -3176,6 +3176,18 @@ class EndToEnd(unittest.TestCase):
term.send("q")
self.assertEqual(term.close(), 130)
def test_no_key_on_a_screen_reached_by_itself_closes_it(self):
"""Given --platform, as the offline launcher route is, the check
runs at once and the plan follows without a key: the close counted
only on the first screen, and never came."""
repo = self.repo()
self.env[install.TUI_IDLE_ENV] = "1"
term = self.start("--platform", "retroarch", "--dest", str(repo.dest))
term.wait("> Install")
self.assertEqual(term.close(), 0)
self.assertIn("No button pressed, closing.", term.after())
self.assertEqual(repo.installed(), [])
def test_a_desktop_names_its_keys_and_a_pad_its_buttons(self):
self.repo()
for env, bar in (({"DISPLAY": ":0"}, "Enter Continue Esc Quit ? Help"),