← board

feature — real-window auto-closing GUI smoke (solitaire / eliah) + xvfb in gui-test

Context — what xvfb validation showed

Ran every GUI app under xvfb-run with hard timeout guards, using $(PXX_STABLE) (no compiler rebuild):

App --smoke real / no-arg
examples/life/life.pas opens a real GTK window, g_timeout_add(500, AutoQuit)gtk_main_quit, ~9 generations, EXIT 0 gtk_main forever (interactive, correct)
examples/solitaire_gui headless (no window, no event loop), EXIT 0 gtk_main forever
apps/ide/eliah/main.pas headless (no window, no event loop), EXIT 0 gtk_main forever

make gui-test (the tools/gui_suite.sh suite: 10 PCL component tests + solitaire + eliah) is all green under xvfb.

Gap

Only life --smoke actually renders a real window under X and then closes itself. solitaire's and eliah's smoke modes drive their handlers headlessly — they never enter gtk_main, so the real window-creation / map / event-loop / teardown path is not exercised in CI. A regression that only shows once a real window is mapped (e.g. a GTK widget realize bug, a paint handler crash on a live surface) would pass smoke.

Proposal

  1. Real-window auto-closing smoke variant for solitaire and eliah — mirror life's AutoQuit pattern: a --gui-smoke (or extend --smoke) that builds the real window, gtk_mains, and self-quits after a short g_timeout_add(N, AutoQuit) (e.g. 300–500 ms), printing SMOKE OK then exit. Keep the existing headless --smoke assertions too (fast, no display).
  2. Run the suite under a display. Wrap the gui-test target (or the real- window cases inside gui_suite.sh) in xvfb-run -a, with a hard timeout per app as a safety net so a missing self-quit can never hang CI. Headless smoke needs no display; the new real-window smoke does.
  3. Add life to the suite. It is the only existing real-window self-closing GUI run and is currently not in gui_suite.sh; add it as the reference case.

Done when

Notes

Log