forgetest: the liveness test waits for the probe's log line; forgectrl pinned at 0.1.4 (the probe's detail text); the campaign log records the first campaign

This commit is contained in:
ScottW514
2026-09-06 20:57:56 -04:00
parent 0df0162c8d
commit 143ef11a60
3 changed files with 44 additions and 2 deletions
+6
View File
@@ -383,7 +383,13 @@ def _liveness_masked_restart(ctx, fc, ev):
or m.get("controller") == "motion-fault"):
break
ctx.sleep(1)
# The probe's own line reaches the file through rsyslog a moment after
# the supervisor reports its verdict: wait for it, briefly.
t1 = time.time()
lines = _probe_lines(FORGECTRL_LOG, off)
while not lines and time.time() - t1 < 10:
ctx.sleep(0.5)
lines = _probe_lines(FORGECTRL_LOG, off)
for ln in lines:
ctx.log(" %s", ln.split(" INFO ", 1)[-1] if " INFO " in ln else ln[-160:])
ev["masked_restart"] = {"mode": m, "probe_lines": lines[-4:], "motor_lock_after": ctx.sysfs("cnc/motor_lock")}