forgectrl: bump to 2df5122 (panel as src/ui/, bundled at build); panel-serves covers it

The panel moved out of ui.c into src/ui/{index.html,panel.css,panel.js},
bundled into index_html[] by CMake. forgectrl.panel-serves now covers
src/ui/** and checks that the served page carries no external asset
reference - the bundle is what keeps the panel a single self-contained
response, and this is where that would break. Fetch-verified and
cross-built in the build tree (bitbake forgectrl).
This commit is contained in:
ScottW514
2026-08-16 18:22:42 -04:00
parent a9a585d44d
commit b90c53c739
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -202,8 +202,8 @@ def settings_bounds(ctx):
@test("forgectrl.panel-serves", title="Control panel and status endpoints", subsystem="forgectrl",
kind="auto", est_min=1,
covers=[("forgectrl", "src/ui.*"), ("forgectrl", "src/status.*"), ("forgectrl", "src/cam.c"),
("forgectrl", "src/main.c")],
covers=[("forgectrl", "src/ui.*"), ("forgectrl", "src/ui/**"), ("forgectrl", "src/status.*"),
("forgectrl", "src/cam.c"), ("forgectrl", "src/main.c")],
description="The panel page is served, /status carries the machine telemetry the panel and "
"the acceptance tool read, and /cam/status answers.")
def panel_serves(ctx):
@@ -216,6 +216,8 @@ def panel_serves(ctx):
text = body.decode("utf-8", "replace")
ctx.check("<html" in text.lower() and "ForgeFIRM" in text, "the panel does not look like the panel")
ctx.check(fc.token and fc.token in text, "the panel does not embed the bearer token")
ctx.check("<link " not in text and "<script src=" not in text,
"the panel references an external asset (the build did not bundle src/ui/)")
s = fc.status()
for key in ("state", "switches", "coolant", "fans"):
@@ -2,5 +2,5 @@
# only SRCREV and PV here - the image manifest leaves *-pin.inc out of the
# layer content hash because the component entry already identifies the
# pinned source (forgefirm-image-manifest.bbclass).
SRCREV = "5af4fb599e00bea9d116b23ad0c5a016b9ef6f5b"
SRCREV = "2df5122e989ae673eff91856a034ff94a0fa67df"
PV = "0.1.0"