@@ -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/conformance/ # Testkit suites (the `sandbox` crate) beside the older CLI conformance crate
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,71 @@ 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. ` tests/suites/conformance/sandbox ` is the first testkit
148+ suite; it has one smoke test. Run it against a local Docker 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. It is adapted from the runner in
169+ NVIDIA/OpenShell #4629 by Evan Lezar.
170+
171+ ``` shell
172+ nix run .# openshell-test-runner -- \
173+ --environment ubuntu-docker-rootful --installer deb \
174+ --family conformance --package sandbox
175+ ```
176+
177+ It:
178+
179+ 1 . builds the family's packages on the host as a nextest archive for the
180+ guest's musl target, with ` testkit-ready ` ;
181+ 2 . boots the tmachine environment with the installer (this needs KVM, and
182+ tmachine only boots guests of the host's architecture);
183+ 3 . copies the archive in, waits for the gateway with ` testkit-ready ` , and runs
184+ the tests with the guest's ` cargo-nextest ` , pointing them at the installed
185+ CLI (` OPENSHELL_BIN ` ) and the gateway the installer registered
186+ (` OPENSHELL_GATEWAY ` , ` --gateway ` , default ` openshell ` );
187+ 4 . writes ` junit.xml ` , ` nextest.log ` and, after a failure, the guest's
188+ diagnostics to ` artifacts/test-results/ ` (` --results ` );
189+ 5 . shuts the VM down, also on failure or SIGTERM.
190+
191+ A run passes if nextest succeeds and its JUnit report shows at least one test
192+ and no failures. ` --filter <filterset> ` narrows the tests with a nextest
193+ filterset, and ` --keep ` leaves the VM running until you press Enter. Every SSH
194+ and nextest step has a timeout. Two runs on one host need different
195+ ` TMACHINE_SSH_PORT ` values (default 2222). The installer inputs, such as the
196+ Debian package and the images, come from ` artifacts/ ` , built by
197+ ` nix run .#build-artifacts ` or downloaded by CI.
198+
199+ A flaky or broken test is marked ` #[ignore = "<issue link>"] ` , which takes it
200+ out of every environment until it's fixed.
201+
202+ ** CI.** ` .github/workflows/e2e-suites.yml ` lists the environments and suites as
203+ an explicit matrix and runs the runner once per row. Branch E2E calls it when
204+ the ` test:e2e ` label is set. It is advisory for now. To run a suite in another
205+ environment on CI, add a row.
206+
207+ The older conformance, feature and driver lanes in ` .github/workflows/ ` still
208+ run through the tmachine testsuites in ` tests/tmachine/config.nix ` . They move
209+ to the runner as their suites move to testkit.
210+
143211### Python E2E (` e2e/python/ ` )
144212
145213` mise run e2e:python ` builds ` openshell/e2e-python:dev ` from
0 commit comments