Add full HIL bench controller (all 5 milestones)#1
Merged
Conversation
Implements the complete benchctl CLI tool for automated MCU firmware testing on Raspberry Pi 5, from project skeleton through production docs. Includes Pydantic v2 config, edbg/OpenOCD flash, pyserial serial I/O, gpiod GPIO control, health checks, systemd timer, idempotent Pi bootstrap scripts, CI workflow, and example firmware repo workflow. All 54 tests pass, ruff + format clean. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mypy with --ignore-missing-imports doesn't need these since the Protocol return type is satisfied structurally. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix systemctl glob not expanding in check_runner_service (shell=True) - Fix flash dry-run always printing edbg command regardless of probe type - Extract _subprocess_ok and _run_flash helpers to deduplicate probe code - Add describe_command to Probe protocol for dry-run support - Replace json.loads(model_dump_json()) with model_dump(mode="json") - Extract _require_configured guard in RelayController - Remove TOCTOU existence check for absolute paths in artifacts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The systemd timer unit files existed but were never installed during bootstrap, so health checks would not run after a reboot. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
benchctlCLI with Click, Pydantic v2 config validation, structured logging, 7 idempotent Pi bootstrap scripts, udev rules, CI workflow (ruff + mypy + pytest on 3.11/3.12)benchctl flashwith edbg and OpenOCD backends, firmware artifact resolution, subprocess-mocked tests for success/failure/timeout pathsbenchctl serial listen|send|expect(pyserial),benchctl gpio set|get|pulse(libgpiod/gpiod), named pin resolution from config, stubbed relay modulebenchctl healthwith rich table + JSON output, checks for config/probe/serial/GPIO/runner, systemd timer for periodic health monitoring, example 2-job firmware CI workflow--targetselectionVerification
pytest -m "not hardware")ruff checkandruff format --checkcleanbenchctl --helpshows all subcommandsbenchctl config validate --config configs/bench-config.example.yamlpassesTest plan
pip install -e .succeeds;benchctl --helpworksbenchctl config validate --config configs/bench-config.example.yamlpassesbenchctl flash --dry-runshows correct edbg commandbenchctl gpio set --pin reset --value high --dry-runresolves named pinbenchctl serial expect --dry-runshows correct parameters🤖 Generated with Claude Code