forgetest: the offline jobs removed after each test; the record of the first offline campaign

Every offline test now removes the jobs it wrote under /tmp/forgetest
on its way out (the bench rule: nothing left behind in the session that
put it there). CAMPAIGN-LOG gets the 2026-08-22 entry for dev image
20260822232347: the offline service dry-checked, then campaign
c-20260822233344-08de, 13 run and 43 of 43 with the four offline tests in
5.5 minutes, and what the machine said under it. BRINGUP: the offline
service is done and bench-validated.
This commit is contained in:
ScottW514
2026-08-22 19:59:36 -04:00
parent 628f2f7a7f
commit 0cb9044e1d
3 changed files with 57 additions and 5 deletions
+13
View File
@@ -720,6 +720,15 @@ def offline_events(off):
return [e.get("event") for e in off.events if e.get("event")]
def offline_cleanup(ctx):
"""The jobs the offline tests wrote are gone when the test is (tmpfs
would lose them at reboot; the bench rule is sooner)."""
import shutil
if os.path.isdir(JOB_DIR):
shutil.rmtree(JOB_DIR, ignore_errors=True)
ctx.log("offline jobs removed from %s", JOB_DIR)
def offline_job(ctx, name, **kw):
"""Write a synthesized, laser-never-commanded job for the offline
service and return its path (under JOB_DIR, tmpfs)."""
@@ -858,6 +867,7 @@ def lid_interlock_abort(ctx):
lid_interlock_abort_body(ctx, ev, off, job, offset)
finally:
off.__exit__(None, None, None)
offline_cleanup(ctx)
def lid_interlock_abort_body(ctx, ev, off, job, offset):
@@ -956,6 +966,7 @@ def lid_during_button_wait(ctx):
lid_during_button_wait_body(ctx, ev, off, job, offset)
finally:
off.__exit__(None, None, None)
offline_cleanup(ctx)
def lid_during_button_wait_body(ctx, ev, off, job, offset):
@@ -1135,6 +1146,7 @@ def oversize_stream(ctx):
oversize_stream_body(ctx, ev, off, job, offset, before)
finally:
off.__exit__(None, None, None)
offline_cleanup(ctx)
def oversize_stream_body(ctx, ev, off, job, offset, before):
@@ -1252,6 +1264,7 @@ def paused_lid_cancel(ctx):
paused_lid_cancel_body(ctx, ev, off, job, offset)
finally:
off.__exit__(None, None, None)
offline_cleanup(ctx)
def paused_lid_cancel_body(ctx, ev, off, job, offset):