@@ -17,6 +17,9 @@ python/openshell/ # Python unit tests (*_test.py suffix)
1717e2e/python/ # Python E2E tests (test_*.py prefix)
1818e2e/rust/ # Rust CLI E2E tests
1919tests/testkit/ # Support library for SDK-driven E2E suites
20+ tests/suites/ # E2E suites, grouped by test family
21+ tests/tmachine/ # QEMU test machines, Ansible playbooks, and the Session API
22+ tests/runner/ # openshell-test-runner: runs a test family in a tmachine environment
2023```
2124
2225## Rust Tests
@@ -140,6 +143,66 @@ by `OPENSHELL_BIN`. See
140143[ tests/testkit/README.md] ( tests/testkit/README.md ) for how to write and run
141144tests.
142145
146+ Suites live under ` tests/suites/<family>/ ` . Each family is a Cargo workspace
147+ with its own lockfile. Run the ` conformance ` suites against a local Docker
148+ gateway with:
149+
150+ ``` shell
151+ mise run e2e:testkit
152+ ```
153+
154+ That task runs ` e2e/with-docker-gateway.sh ` , which starts a gateway and exports
155+ ` OPENSHELL_GATEWAY ` and ` OPENSHELL_BIN ` , so the suite runs the same way the
156+ runner runs it in a guest.
157+
158+ Workspaces that build root crates through path dependencies must lock shared
159+ crates at the versions in the root ` Cargo.lock ` ; otherwise CI can build against
160+ dependencies the Nix toolchain doesn't support. ` mise run rust:lockfiles:check `
161+ verifies this, and ` uv run tasks/scripts/check_cargo_lockfile_alignment.py --fix `
162+ re-locks a workspace from the root lockfile. Add new testkit workspaces to
163+ ` ALIGNED_WORKSPACES ` in that script.
164+
165+ ### Running suites in a tmachine environment (` tests/runner/ ` )
166+
167+ ` openshell-test-runner ` runs a test family inside a tmachine VM, against the
168+ OpenShell that the VM's installer set up.
169+
170+ ``` shell
171+ nix run .# openshell-test-runner -- \
172+ --environment ubuntu-docker-rootful --installer deb \
173+ --family conformance --package sandbox
174+ ```
175+
176+ It:
177+
178+ 1 . builds the family's packages on the host as a nextest archive for the
179+ guest's musl target, with ` testkit-ready ` ;
180+ 2 . boots the tmachine environment with the installer (this needs KVM, and
181+ tmachine only boots guests of the host's architecture);
182+ 3 . copies the archive in, waits for the gateway with ` testkit-ready ` , and runs
183+ the tests with the guest's ` cargo-nextest ` , pointing them at the installed
184+ CLI (` OPENSHELL_BIN ` ) and the gateway the installer registered
185+ (` OPENSHELL_GATEWAY ` , ` --gateway ` , default ` openshell ` );
186+ 4 . writes ` junit.xml ` , ` nextest.log ` and, after a failure, the guest's
187+ diagnostics to ` artifacts/test-results/ ` (` --results ` );
188+ 5 . shuts the VM down, also on failure or SIGTERM.
189+
190+ A run passes if nextest succeeds and its JUnit report shows at least one test
191+ and no failures. ` --filter <filterset> ` narrows the tests with a nextest
192+ filterset, and ` --keep ` leaves the VM running until you press Enter. Every SSH
193+ and nextest step has a timeout. Two runs on one host need different
194+ ` TMACHINE_SSH_PORT ` values (default 2222). The installer inputs, such as the
195+ Debian package and the images, come from ` artifacts/ ` , built by
196+ ` nix run .#build-artifacts ` or downloaded by CI.
197+
198+ A flaky or broken test is marked ` #[ignore = "<issue link>"] ` , which takes it
199+ out of every environment until it's fixed.
200+
201+ ** CI.** ` .github/workflows/e2e-suites.yml ` lists the environments and suites as
202+ an explicit matrix and runs the runner once per row. Branch E2E calls it when
203+ the ` test:e2e ` label is set. It is advisory, so a failure doesn't block
204+ merging. To run a suite in another environment on CI, add a row.
205+
143206### Python E2E (` e2e/python/ ` )
144207
145208` mise run e2e:python ` builds ` openshell/e2e-python:dev ` from
0 commit comments