forgetest: the release acceptance tool and the bench diagnostics page

A stdlib-only daemon on the dev image (HTTP :8090) that runs the acceptance
catalog against the machine from a self-contained page, keeps the append-only
result log under /data/forgetest, and exports the release artifact the gate
reads. Tests declare kind (auto / operator / live), hardware (api / takeover),
coverage globs, prerequisites, and core membership; a test's domain
fingerprint is the hash of the manifest files its globs select plus the
platform and its own implementation, so a PASS stays valid exactly while
nothing it covers changed. Campaign rules: a FAIL ends the campaign, the core
(image health, kernel latch and drills, one live emission witness) is never
inherited, invalidate-all forces a full campaign, no SKIP. Live tests need the
operator acknowledgment and the physical arm press through the controller;
takeover tests stop forgectrl for the duration with a crash-recoverable
marker; the tool never touches the laser latch.

Catalog v1: 24 tests ported from the proven bench drills with their recorded
pass criteria (image, kernel K1-K3 and fire A/B/U, forgectrl API and logs,
motion incl. dead-man, cooling, live laser, camera, update, cloud). The bench
tab lists every scripts/bench tool and runs the board-side ones as
subprocesses (takeover tools wrapped). 44 host unit tests, including the gate
verification fixtures. Installed only by forgefirm-image-dev, with the bench
scripts under /usr/share/forgetest/bench.
This commit is contained in:
ScottW514
2026-08-15 15:57:11 -04:00
parent 9b5558dfbc
commit c0f53a865f
35 changed files with 5508 additions and 2 deletions
@@ -0,0 +1,47 @@
SUMMARY = "ForgeFIRM release acceptance tool (dev image)"
DESCRIPTION = "Runs the release acceptance catalog against the machine from a \
self-contained web page (HTTP :8090), keeps the append-only result log under \
/data/forgetest, exports the release artifact the release gate reads, and \
carries the bench diagnostics page. Installed only on the dev image."
HOMEPAGE = "https://github.com/ScottW514/forgefirm"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
# The tool's canonical home is forgetest/ in this repo; the bench scripts
# it drives live in scripts/bench/. Both are packaged from the same tree
# that builds the images, so the catalog and the gate agree by construction.
FILESEXTRAPATHS:prepend := "${THISDIR}/../../../:"
SRC_URI = " \
file://forgetest/ \
file://scripts/bench/ \
"
S = "${WORKDIR}"
inherit python3-dir update-rc.d forgefirm-manifest
# Non-git sources: fingerprint the package directory (dev-only component;
# it identifies the campaign, never a test fingerprint).
FORGEFIRM_MANIFEST_SRC = "${WORKDIR}/forgetest/forgetest"
RDEPENDS:${PN} = "python3 forgectrl"
INITSCRIPT_NAME = "forgetest"
INITSCRIPT_PARAMS = "start 95 2 3 4 5 . stop 70 0 1 6 ."
do_install() {
# the package (sources only; python compiles on first import)
for f in $(cd ${WORKDIR}/forgetest/forgetest && find . -name '*.py' -type f); do
install -Dm 0644 ${WORKDIR}/forgetest/forgetest/$f \
${D}${PYTHON_SITEPACKAGES_DIR}/forgetest/$f
done
# the bench scripts the #bench tab drives
install -d ${D}${datadir}/forgetest/bench
for f in ${WORKDIR}/scripts/bench/*.py; do
install -m 0755 $f ${D}${datadir}/forgetest/bench/
done
install -Dm 0755 ${WORKDIR}/forgetest/forgetest.init ${D}${sysconfdir}/init.d/forgetest
}
FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}/forgetest ${datadir}/forgetest"
@@ -3,9 +3,12 @@ require forgefirm-image.bb
DESCRIPTION = "OpenGlow/ForgeFIRM development image for Glowforge"
# Strict superset of forgefirm-image: everything the main image ships, plus
# debug tooling.
# debug tooling. forgetest is the release acceptance tool (HTTP :8090) and
# the bench diagnostics page; it belongs to the bench, never to a release
# image (docs/ACCEPTANCE.md).
IMAGE_INSTALL += " \
forgectrl \
forgetest \
"
# debug-tweaks (passwordless root, root SSH login) belongs ONLY to the dev