Skip to content

Add mockgrbl CI integration-test foundation#73

Merged
ianbruene merged 1 commit into
masterfrom
codex/add-ci-integration-for-mockgrbl
Jul 15, 2026
Merged

Add mockgrbl CI integration-test foundation#73
ianbruene merged 1 commit into
masterfrom
codex/add-ci-integration-for-mockgrbl

Conversation

@ianbruene

Copy link
Copy Markdown
Owner

Motivation

  • Provide a small, reliable CI foundation to exercise DDGo against the Linux PTY-backed mockgrbl so integration tests can run in CI without hardware or UI dependencies.
  • Keep the change small and reviewable while proving the mock can be launched in CI, exposes a serial symlink and debug API, and supports minimal DDGo-over-mock tests.

Description

  • Add a smoke script scripts/ci_mockgrbl_smoke.sh that builds cmd/mockgrbl, starts it with a unique PTY symlink and debug HTTP address, waits for the symlink and GET /state readiness, prints diagnostics on failure, and guarantees process cleanup via trap.
  • Add a Linux-only integration harness package internal/integration/mockgrbl with mockgrbl_e2e_test.go (build tag linux && serial && mockgrbl_e2e) that builds/launches the mock per-test, waits on /state, returns the serial symlink and HTTP base URL, captures logs, and ensures cleanup and diagnostics.
  • Add initial DDGo-over-mock integration tests that use the real serial transport and app.Controller to exercise status polling, a jog-then-stop scenario, and assert range-based machine positions rather than precise timings.
  • Improve cmd/mockgrbl PTY handling by configuring the slave in raw mode (cmd/mockgrbl/pty_linux.go) and tolerate transient PTY EIO reads while preserving EOF/closed behavior (cmd/mockgrbl/main.go).

Testing

  • Ran go test ./... which succeeded for the repo packages and go test -tags serial ./internal/transport ./internal/ports ./internal/app ./internal/grbl which succeeded.

  • Executed the smoke script scripts/ci_mockgrbl_smoke.sh which reported readiness (mockgrbl smoke test ready).

  • Executed the integration suite go test -tags 'serial mockgrbl_e2e' ./internal/integration/mockgrbl which passed locally.

  • Commits included: e2fbe5aci: smoke test mockgrbl startup, 657106btest: add mockgrbl integration harness, and 5887a3btest: exercise DDGo against mockgrbl, and CI uses Ubuntu-only steps in the existing test job rather than adding a new job.

  • Known remaining gaps: no UI-level integration yet, no macro/probe/contour scenarios over the mock, the mock intentionally approximates some firmware behaviors, and integration tests assert ranges (tolerances) rather than exact real-time positions.


Codex Task

@ianbruene
ianbruene merged commit 8531fc3 into master Jul 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant