mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-10-18 18:41:41 -07:00
forgetest: button.c and led.c leave the host-tested rows for the covers of the tests that drive them
HOST_TESTED carried forgectrl's src/button.* and src/led.* against host_setup.sh, which presents the button as a held word in a fake switches file and no LED at all. Both are driven on the machine by catalog tests that still run: the fuse view forgectrl.auth reads is two-factor, the token and the physical button (main.c cb_fuse_identity through operator_present, button.c); the setup checks' press prompts read the button and light it through led.c, and setup.check-switches reads both back. manifest.py's own rule puts a path a catalog test exercises on the hardware in that test's covers, not in a row: in a row it is in no fingerprint, so a change to the button's poll, its debounce or the LED release moved nothing and every PASS was inherited past it. - manifest.py: the two rows go (src/hooks.h stays: main.c's hook declarations, proven through the setup routes on a host). - suite/forgectrl.py: src/button.* joins _COVERS_AUTH. - suite/setup_dark.py: src/button.* and src/led.* join DARK_COVERS, the covers of every setup check. The laser tests judge the LED by the target the controller writes (glowforge_laser.c button_led), so led.c is not theirs. Proof: the coverage lint, enforced, on the tree manifest from the current pins: 0 uncovered paths, 0 host-tested row problems, 43 tests. tests/test_manifest.py (34) and the unit suite pass. Acceptance: the fingerprints of forgectrl.auth and of every setup check move; a release campaign runs them again.
This commit is contained in:
@@ -192,8 +192,6 @@ HOST_TESTED = [
|
||||
("forgectrl", "docs/advisories/privacy.md", "forgectrl:tests/host_setup.sh", "forgectrl:.github/workflows/build.yml"),
|
||||
("forgectrl", "docs/advisories/cloud-service.md", "forgectrl:tests/host_setup.sh",
|
||||
"forgectrl:.github/workflows/build.yml"),
|
||||
("forgectrl", "src/button.*", "forgectrl:tests/host_setup.sh", "forgectrl:.github/workflows/build.yml"),
|
||||
("forgectrl", "src/led.*", "forgectrl:tests/host_setup.sh", "forgectrl:.github/workflows/build.yml"),
|
||||
("forgectrl", "src/hooks.h", "forgectrl:tests/host_setup.sh", "forgectrl:.github/workflows/build.yml"),
|
||||
# The setup sheet id from the fuse serial, against golden ids.
|
||||
("forgectrl", "src/sheetid.*", "forgectrl:tests/sheetid_test.c", "forgectrl:.github/workflows/build.yml"),
|
||||
|
||||
@@ -10,9 +10,10 @@ from ..catalog import test
|
||||
|
||||
# The write guard reads the account and the session store (a machine with
|
||||
# an account needs a session from the LAN; this host and the dev image
|
||||
# write with the token), so both are the guard's domain.
|
||||
# write with the token), so both are the guard's domain. The fuse view
|
||||
# is two-factor: the token and the physical button, read by button.c.
|
||||
_COVERS_AUTH = [("forgectrl", "src/auth.*"), ("forgectrl", "src/peer.*"), ("forgectrl", "src/main.c"),
|
||||
("forgectrl", "src/session.*"), ("forgectrl", "src/users.*"),
|
||||
("forgectrl", "src/session.*"), ("forgectrl", "src/users.*"), ("forgectrl", "src/button.*"),
|
||||
("forgectrl", "src/ui/login.*"), ("forgectrl", "src/ui/wizard.js")]
|
||||
|
||||
|
||||
|
||||
@@ -26,9 +26,12 @@ PRESS_TEXT = "The button is lit white. Press it now: the laser fires after your
|
||||
# check switches it back on. The bench reference draws its off current
|
||||
# (74) for the first seconds and settles near 630.
|
||||
PURGE_SPINUP_S = 30
|
||||
# The checks' press prompts read the button (button.c) and light it
|
||||
# (led.c) on the machine; the switches check reads both back.
|
||||
DARK_COVERS = [("forgectrl", "src/wizdark.*"), ("forgectrl", "src/wizcalc.*"),
|
||||
("forgectrl", "src/wiz.*"), ("forgectrl", "src/setup.*"),
|
||||
("forgectrl", "src/main.c"), ("forgectrl", "src/ui/wizard.*")]
|
||||
("forgectrl", "src/main.c"), ("forgectrl", "src/ui/wizard.*"),
|
||||
("forgectrl", "src/button.*"), ("forgectrl", "src/led.*")]
|
||||
# The lens window: the free half-steps below and above the hall edge the
|
||||
# Lens travel check writes, and the fallback the lens frame holds while
|
||||
# they are unset (lens.h).
|
||||
|
||||
Reference in New Issue
Block a user