fix(e2e): headless Graph construction + keep simulator cmdloop alive
Run 10537 reached node boot but the simulator crashed again at Graph construction: lib/gui.py move_figure() unconditionally touches the Tk window manager (canvas.manager.window), which does not exist under Agg. Patch it to a no-op guard alongside the TkAgg->Agg backend swap. Also feed the simulator's interactive cmdloop from a FIFO held open until teardown — CI stdin is EOF, so the sim would otherwise exit immediately after booting the nodes.
This commit is contained in:
@@ -85,11 +85,16 @@ simulator. Nothing is forwarded when the daemon is local (unset/unix
|
||||
on the forwarders themselves.
|
||||
|
||||
Other headless adaptations the script makes automatically:
|
||||
* patches `lib/gui.py` `matplotlib.use("TkAgg")` → `"Agg"` in the pinned
|
||||
Meshtasticator checkout — the TkAgg call crashes headless runs even under
|
||||
`MPLBACKEND=Agg` (only the interactive GUI mode is lost),
|
||||
* patches `lib/gui.py` in the pinned Meshtasticator checkout: forces the Agg
|
||||
backend (the code calls `matplotlib.use("TkAgg")` at import) and makes
|
||||
`move_figure()` a no-op when no Tk window manager exists (its unconditional
|
||||
`canvas.manager.window` access crashes under Agg at Graph construction).
|
||||
Only the interactive GUI modes, never used by this harness, are lost,
|
||||
* warms the `meshtastic/meshtasticd` image (`docker pull`) before booting the
|
||||
simulator so the pull is not on the simulator's node-boot critical path.
|
||||
simulator so the pull is not on the simulator's node-boot critical path,
|
||||
* feeds the simulator's interactive `cmdloop` from a FIFO held open until
|
||||
teardown — an EOF stdin (e.g. CI) would otherwise make it exit right after
|
||||
booting the nodes.
|
||||
|
||||
Without `MESHTASTICATOR_E2E=1` the e2e module skips, so ordinary unit/CI runs
|
||||
stay fast and gateway-free.
|
||||
|
||||
Reference in New Issue
Block a user