coverage: make targets + close zero-cov gaps (namegen, sessionstream)

Adds `make coverage` (per-package + total via -coverpkg=./...),
`make coverage-html`, and `make coverage-total` (CI-friendly). Wires
coverage.out/coverage.html through `make clean` and .gitignore.

Closes the two easy zero-coverage packages: namegen (77.8%) and
sessionstream (93.5%). Total statement coverage 51.7% -> 52.1%.
This commit is contained in:
Thales Maciel 2026-04-18 17:44:37 -03:00
parent 88425fb857
commit 18bf89eae9
No known key found for this signature in database
GPG key ID: 33112E6833C34679
5 changed files with 204 additions and 11 deletions

View file

@ -51,7 +51,8 @@ Always run `make build` before commit.
## Testing Guidance
- Primary automated coverage is `go test ./...`.
- Primary automated coverage is `go test ./...` (wired through `make test`).
- `make coverage` runs the suite with `-coverpkg=./...` and prints per-package averages plus a total; `make coverage-html` writes a browsable report to `coverage.html`; `make coverage-total` prints just the total (for scripts/CI).
- For lifecycle changes, smoke-test with `vm run` end-to-end (covers create + start + boot + ssh).
- If guest provisioning changes, document whether existing images must be rebuilt or recreated.