Add a reusable GTK2 startup smoke test to Linux CI
Review effort 2/5
### **User description**
## Summary
- Add a reusable GTK2 startup smoke test to the native x86_64 Linux CI build.
- Keep the test logic in a ShellCheck-covered Unix helper and isolate the GTK2 runtime home.
- Require one visible main window, a live process, and no startup output while bounding child-process cleanup.
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Add a GTK2 startup smoke test to Linux CI to catch headless startup regressions. It runs `Transgui` under `Xvfb` + `twm`, requires one visible main window, a live process, and no startup output.
- **New Features**
- Runs on `x86_64` in a Debian Bookworm container; installs `libgtk2.0-0`, `xvfb`, `twm`, `xdotool`.
- Uses a standalone, ShellCheck-covered helper that isolates `HOME`, sets minimal `transgui.ini` and `.twmrc`, starts the display, then launches `/transgui/transgui` with `G_DEBUG=fatal-criticals` and `LIBOVERLAY_SCROLLBAR=0`.
- Verifies exactly one visible `Transgui` main window persists and the process stays alive; fails on any stdout/stderr; prints X/WM logs and cleans up all child processes and temp files.
<sup>Written for commit dadabdbe208398f48d8027300338c20f3866bbac. Summary will update on new commits.</sup>
<a href="https://cubic.dev/pr/transmission-remote-gui/transgui/pull/1561?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Tests**
* Added a Linux graphical startup smoke test for x86_64 systems.
* Verifies the application launches successfully, displays exactly one main window, remains running, and produces no startup errors.
* Automatically manages the test display environment and cleans up temporary processes and files.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
___
### **PR Type**
Tests, Enhancement
___
### **Description**
- Add reusable GTK2 graphical startup smoke test.
- Run GTK2 smoke test for x86_64 Linux CI.
- Validate window visibility, process health, and clean output.
- Isolate runtime settings and reliably clean child processes.
___
### Diagram Walkthrough
```mermaid
flowchart LR
Build["Built Transgui binary"]
Container["x86_64 Linux CI container"]
Smoke["GTK2 startup smoke-test helper"]
Display["Xvfb and twm display"]
Checks["Window, process, and output checks"]
Build -- "mounted into" --> Container
Container -- "runs" --> Smoke
Smoke -- "starts" --> Display
Smoke -- "validates" --> Checks
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>smoke_test_gtk2_startup.sh</strong><dd><code>Add isolated GTK2 graphical startup smoke test</code> </dd></summary>
<hr>
setup/unix/smoke_test_gtk2_startup.sh
<ul><li>Add a reusable Bash helper for GTK2 startup validation.<br> <li> Create an isolated temporary <code>HOME</code> and minimal app configuration.<br> <li> Start <code>Xvfb</code> and <code>twm</code>, then launch <code>transgui</code> headlessly.<br> <li> Require one visible main window, a live process, and empty startup <br>output.</ul>
</details>
</td>
<td><a href="https://github.com/transmission-remote-gui/transgui/pull/1561/files#diff-bde644d171f6a97bcd4bdb23fad9e8cf719e1735d850456a3440395a98aedaa9">+209/-0</a> </td>
</tr>
<tr>
<td>
<details>
<summary><strong>ci.yml</strong><dd><code>Run GTK2 smoke test in Linux CI</code> </dd></summary>
<hr>
.github/workflows/ci.yml
<ul><li>Add an x86_64-only GTK2 startup smoke-test CI step.<br> <li> Install GTK2 runtime, <code>Xvfb</code>, <code>twm</code>, and <code>xdotool</code> in the build container.<br> <li> Execute the reusable smoke-test helper against the built binary.</ul>
</details>
</td>
<td><a href="https://github.com/transmission-remote-gui/transgui/pull/1561/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03f">+11/-0</a> </td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
合并状态:未合并 14 条评论