mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-28 01:01:12 -07:00
The acceptance page is assembled by page.py from forgetest/forgetest/ui/ (index.html, page.css, help.js, app.js) plus theme.css and the vendored Bootstrap files, which are byte for byte the ones forgectrl's panel carries, so the two pages look like one product and share the light and dark themes (same localStorage key). A plain file is read in a checkout; on the dev image the recipe installs ui/ gzipped and page.py reads the .gz sibling, inflating once at first request: the rootfs is raw ext4, so bytes in the package are bytes on the image. The explanatory prose (campaign rules, the queues, the campaign actions, the prerequisites switch, the bench intro) is a "?" popover with a link into the documentation site; operator steps, prompts, notices and the live-laser acknowledgment stay in the page, and confirmLive() stays a blocking dialog. The page's own rules hold: rows, prompt buttons and tool entries are built once and updated in place, and the popovers sit on static markup only, so no rebuild orphans one. On a phone the Run pane goes to the top for the duration of a run. scripts/check-ui-vendor.py compares the shared files against forgectrl at its pinned revision (or a local checkout with --forgectrl); it runs in forgetest-ci.yml, so the copies cannot drift. Tests: test_page.py (the gzipped install assembles to the same bytes as a checkout, one self-contained response, the token placeholder once, a missing marker refused); test_server asserts the served page's invariants; test_responsiveness keeps its rules with needles pointed at the new files, its ASCII rule applied to our own sources (Bootstrap's CSS carries an em dash of its own), and its self-contained rule testing asset tags rather than the presence of https:// (the documentation links are meant to be there). forgectrl.panel-serves gains two needles for the panel's theme attribute and save bar. Proof: the unit suite, and the page in Chrome against a fake catalog (both themes, popovers, the bench tab, a full operator run with its prompt, abort). forgectrl pinned at 9d1f6f2 (the panel on Bootstrap, one save bar, help popovers, themes, the gzipped page); PV unchanged. The pin moves only forgectrl's fingerprint. The forgetest changes are the harness's own and have no catalog consequence.
56 lines
2.4 KiB
BlitzBasic
56 lines
2.4 KiB
BlitzBasic
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 page's sources (ui/), gzipped: page.py inflates them once at
|
|
# first request, and bytes here are bytes on the ext4 rootfs
|
|
for f in $(cd ${WORKDIR}/forgetest/forgetest/ui && find . -type f); do
|
|
install -d ${D}${PYTHON_SITEPACKAGES_DIR}/forgetest/ui/$(dirname $f)
|
|
gzip -9 -n -c ${WORKDIR}/forgetest/forgetest/ui/$f \
|
|
> ${D}${PYTHON_SITEPACKAGES_DIR}/forgetest/ui/$f.gz
|
|
chmod 0644 ${D}${PYTHON_SITEPACKAGES_DIR}/forgetest/ui/$f.gz
|
|
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"
|