mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-27 08:41:13 -07:00
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:
@@ -202,8 +202,8 @@ def settings_bounds(ctx):
|
|||||||
|
|
||||||
@test("forgectrl.panel-serves", title="Control panel and status endpoints", subsystem="forgectrl",
|
@test("forgectrl.panel-serves", title="Control panel and status endpoints", subsystem="forgectrl",
|
||||||
kind="auto", est_min=1,
|
kind="auto", est_min=1,
|
||||||
covers=[("forgectrl", "src/ui.*"), ("forgectrl", "src/status.*"), ("forgectrl", "src/cam.c"),
|
covers=[("forgectrl", "src/ui.*"), ("forgectrl", "src/ui/**"), ("forgectrl", "src/status.*"),
|
||||||
("forgectrl", "src/main.c")],
|
("forgectrl", "src/cam.c"), ("forgectrl", "src/main.c")],
|
||||||
description="The panel page is served, /status carries the machine telemetry the panel and "
|
description="The panel page is served, /status carries the machine telemetry the panel and "
|
||||||
"the acceptance tool read, and /cam/status answers.")
|
"the acceptance tool read, and /cam/status answers.")
|
||||||
def panel_serves(ctx):
|
def panel_serves(ctx):
|
||||||
@@ -216,6 +216,8 @@ def panel_serves(ctx):
|
|||||||
text = body.decode("utf-8", "replace")
|
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("<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(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()
|
s = fc.status()
|
||||||
for key in ("state", "switches", "coolant", "fans"):
|
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
|
# only SRCREV and PV here - the image manifest leaves *-pin.inc out of the
|
||||||
# layer content hash because the component entry already identifies the
|
# layer content hash because the component entry already identifies the
|
||||||
# pinned source (forgefirm-image-manifest.bbclass).
|
# pinned source (forgefirm-image-manifest.bbclass).
|
||||||
SRCREV = "5af4fb599e00bea9d116b23ad0c5a016b9ef6f5b"
|
SRCREV = "2df5122e989ae673eff91856a034ff94a0fa67df"
|
||||||
PV = "0.1.0"
|
PV = "0.1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user