Skip to content

refactor(tests): move tmachine support files under tests/tmachine - #4726

Open
matthewgrossman wants to merge 3 commits into
mainfrom
refactor/4725-move-tmachine/matthewgrossman
Open

matthewgrossman wants to merge 3 commits into
mainfrom
refactor/4725-move-tmachine/matthewgrossman

Conversation

@matthewgrossman

@matthewgrossman matthewgrossman commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Move tmachine's Ansible, cloud-init, and Nix config into tests/tmachine/, next to the tmachine crate, which stays where it is. tests/suites/ and tests/support/ are unchanged. This is the first step in landing the conformance harness from #4629 incrementally.

Related Issue

Closes #4725
Part of #3954

Changes

  • tests/{ansible,cloud-init,config.nix,images.nix,artifacts.nix} → tests/tmachine/. The crate (Cargo.toml, src/, default.nix) does not move.
  • tests/tmachine/default.nix builds from a fileset of Cargo.toml, Cargo.lock, and src/, so edits to the Ansible and Nix config beside it do not rebuild tmachine.
  • tmachine still runs from the directory holding ansible/, so playbook paths are unchanged. Inputs outside it gain one ../: artifacts, e2e/, scripts/, and the Podman fixtures in tests/suites/.
  • Updated flake.nix, artifacts.nix (vm-runtime path), the failure-only openshell_diagnostics output path, test-packaging-assets.sh, .gitignore, and TESTING.md.

The base image derivations are identical to main. The tmachine binary rebuilds once because its Nix source is now a fileset. The diagnostics role change alters the Ansible hash that keys tmachine's disk cache, so cached install and test layers miss.

Testing

  • cargo check --locked and cargo fmt --check for tests/tmachine
  • tasks/scripts/test-packaging-assets.sh
  • Base image derivations match main; editing Ansible, config.nix, images.nix, or cloud-init does not change the tmachine derivation, and editing src/ does
  • Every playbook and input path in the generated tmachine config resolves from the new working directory
  • nix run .#tmachine -- setup ubuntu-docker-rootful boots and provisions a VM (arm64 macOS)
  • All 13 tmachine lanes passed (test:e2e) on the first commit, before the crate stayed in place
  • tmachine lanes (test:e2e) on the current head

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

Ansible, cloud-init, and the tmachine Nix config belong to tmachine, so
they now live in tests/tmachine/ alongside the crate, which moves to
tests/tmachine/cli/. tests/suites/ and tests/support/ are unchanged.

tmachine still runs from the directory holding ansible/, so playbook
paths stay the same; only inputs outside that directory gain a ../
prefix. The Nix build of tmachine and the base images are identical to
before.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman matthewgrossman added the test:e2e Requires end-to-end coverage label Oct 19, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown

Label test:e2e applied, but pull-request/4726 does not exist yet. A maintainer needs to comment /ok to test 1584a9e38ad83d6de4754bcf967a6c84d2516603 to mirror this PR. Once the mirror exists, re-apply the label or re-run Branch E2E Checks from the Actions tab.

@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test 1584a9e

The crate boots VMs, provisions them with Ansible, runs suites, and
caches disks; the other entries in tests/tmachine/ are its config.
Name the directory for that role rather than for the command-line
entry point.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test d545087f84dcd85ccb8758f1b88bf4e8a87ba2c9

@matthewgrossman
matthewgrossman marked this pull request as ready for review October 19, 2026 22:37
Put the crate back at tests/tmachine/, next to the Ansible and Nix config
it uses, instead of in a subdirectory. Build tmachine from a fileset of
Cargo.toml, Cargo.lock, and src/ so edits to that config do not rebuild
the binary.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test e02d50d

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(tmachine): move tmachine support files under tests/tmachine

1 participant