Skip to content

test: simplify suites and link each crate into one test binary - #12613

Merged
cv merged 7 commits into
v1from
test/simplify-suites
Oct 5, 2026
Merged

cv merged 7 commits into
v1from
test/simplify-suites

Conversation

@cv

@cv cv commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Simplifies the test suites, in seven commits. The biggest change links each crate's integration tests into one binary, so builds are much faster:

Linux ARM64 Before After
Test binaries 133 (22.5 GB) 26 (3.5 GB)
Workspace rebuild after one SDK source change 38 s 10–11 s
cargo nextest list 36 s 0.85 s
cargo ci build step 44–60 s 18 s

Commits

  1. test: drop guard tests that list files by name
    • Removes the scripts guard (AGENTS.md still states the Rust rule).
    • The onboarding example tests are now generated by a build script from examples/, so a new example gets a test automatically and that guard isn't needed.
  2. test(sdk): stop checking each example's editor schema comment
    • That check was a file-content test. cargo ci schema already keeps the checked-in schema identical to the generated one.
  3. test(sdk): check the example corpus in one test and drop unused fixtures
    • One test now schema-checks, parses and round-trips every example, including subdirectories.
    • Removes two narrower tests that walked examples or fixtures, and seven fixture configs that nothing else read (outdated copies of examples).
  4. test(e2e): run the discovery and gateway readiness fixtures in CI
    • Six ignored tests in discovery, inference_discovery and gateway_readiness need only the bundle, but no workflow ran them. The lifecycle profile now includes them: 96 tests instead of 90.
    • A seventh test needed a Fabric fixture descriptor and Python that CI doesn't have. The image unit-tests stage and the SDK planner tests cover its checks, so it's removed.
  5. test(sdk): link the integration tests into one binary
    • Sets autotests = false and adds tests/main.rs, which includes each file as a module. Files stay in place, so include_str! paths are unchanged.
    • Shared helpers are declared once; a new support module replaces eight copies of an identical input() helper.
    • SDK alone: 55 binaries → 2; relink after an SDK change 19 s → 7–8 s.
  6. test(e2e): link the integration tests into one binary
    • Same change for e2e. brev stays a separate binary because its workflow copies that one executable to a VM.
    • The lifecycle profile now selects tests by module path; it selects the same 96 tests.
  7. test: link each remaining crate's integration tests into one binary
    • Authoring, provider, build, runtime and CLI.
    • The docs and image workflows, and the doc commands, now select tests by module path (--test integration name::).

Validation (Linux ARM64)

  • cargo ci: passes every step: 1032 tests, then 96 lifecycle tests.
  • Test counts: each crate runs the same tests before and after merging, with the same ignored tests.
  • Feature settings: build tests pass with and without the sdk feature, and runtime tests with and without execution.
  • Workflow selections:
    • the image job's bake:: runs 7 tests and the docs job's docs:: runs 5, without the SDK feature where the job requires it;
    • the Brev workflow's jq lookup still finds its executable.
  • Doc commands: every maintained command selects at least one test. Three already selected nothing on v1 (a test renamed in db923cac65, and two hosted live tests in a nested module); they're fixed.
  • Not run locally: Windows and macOS builds; this PR's CI covers them.

For reviewers

  • New command form: a single file's tests are now selected with cargo test -p CRATE --test integration FILE:: instead of --test FILE.
  • Validation records: the dated records under docs/validation/ keep the commands they ran.

cv added 7 commits October 4, 2026 22:58
Two tests compared a hand-written list with the files on disk: the
scripts guard failed on any Python or shell file it didn't list, and the
onboarding guard failed when an example lacked a hand-written journey
test. Both checked the repository's contents, not code.

The scripts guard is removed; AGENTS.md still states the Rust rule. The
onboarding test list is now generated by a build script from the
examples directory, so a new example gets a journey test without any
listing, and the guard is no longer needed. Examples with more than one
sandbox return early, as the hand-written list excluded them.

Validation: the 39 generated example tests pass (the 30 single-sandbox
examples walk to review). Adding an example produces a new test, and
removing it removes the test. clippy and fmt are clean.
One test required every example to start with a yaml-language-server
comment naming the checked-in schema, then validated the example against
that file. The comment is editor guidance, not behavior. cargo ci schema
already fails when the checked-in schema differs from the generated one,
and another test validates every example against the generated schema.

Validation: the config_schema tests pass and clippy is clean.
Three tests walked configuration files: one parsed every top-level
example, one validated every example against the schema, and one
round-tripped the SDK's fixture configs. Seven of those fixtures were
read by no other test and were outdated copies of same-named examples,
each differing in about 40 lines, so the round-trip test mostly checked
files that nothing used.

The schema test now also parses and round-trips every example, including
subdirectories, and checks that the workspace and digest survive. The
top-level parse test, the fixture round-trip test, and the seven unused
fixtures are removed. inference_connection keeps its own tests. The
fixtures README no longer mentions JSON files that do not exist.

Validation: the config, config_input and config_schema tests pass (35),
and clippy is clean.
Seven ignored tests in the discovery, inference_discovery and
gateway_readiness binaries need only the bundle's OpenTofu, the provider
and local fixtures, which the lifecycle step already provides, but its
filter left them out, so no workflow ran them. Run locally, six pass.

The lifecycle profile now includes those three binaries. The seventh
test also needed a Fabric fixture descriptor and a Python environment
that CI does not provide. Its checks are covered elsewhere: the image
unit-tests stage packages that fixture adapter and delivers its settings
to Fabric's runner, and the SDK planner tests plan the same unknown
adapter's settings. It is removed, and the fixture docs describe where
that coverage now lives.

Validation: the six tests pass through the lifecycle profile (the
longest takes 35 s). The lifecycle profile now selects 96 tests instead
of 90. clippy and the docs check pass.
Each of the SDK's 54 integration-test files built its own binary, and
each linked the whole SDK and its dependencies: 55 binaries and 10.1 GB
of debug output. After any SDK source change, relinking them took 19 s,
while rebuilding the library took 2 s.

The crate now sets autotests = false and declares one integration test,
tests/main.rs, which includes every file as a module. Files stay where
they are, so their include_str! paths are unchanged. Shared helpers are
declared once in main.rs: clippy rejects one file loaded as several
modules. A new support module loads examples and fixtures, replacing
eight copies of identical input() helpers. Docs that ran a single test
file now select it by module path.

Validation: the same 448 tests pass, with the same 10 ignored. The SDK
now builds 2 test binaries (0.56 GB), and relinking after an SDK change
takes 7-8 s instead of 19 s. Each updated docs command selects the same
tests as before. clippy is clean. Windows behavior is checked only in CI.
The e2e crate built 29 test binaries (6.1 GB of debug output), each
linking the SDK, provider and runtime.

It now builds one integration binary from tests/main.rs, with each
file as a module. The Brev test stays a separate binary because its
workflow copies that one executable to a VM. The lifecycle profile now
selects tests by module path within the integration binary instead of
by binary name.

Maintained docs select tests by module path. Three of their commands
already selected nothing: one named a test renamed in db923ca, and
two hosted live tests sit in a nested live module. They now name the
current tests. Dated validation records keep the commands they ran.

Validation: the e2e tests pass (40, with 107 ignored). The lifecycle
profile selects the same 96 tests as before and all pass. The Brev
workflow's jq lookup still finds its executable. Every maintained docs
command selects at least one test. The crate now builds 4 binaries
(0.71 GB).
The authoring, provider, build, runtime and CLI crates still built one
test binary per file, 33 in all, each linking its crate's dependencies.

Each crate now declares one integration test, tests/main.rs, with every
file as a module, as the SDK and e2e crates do. The provider's support
module is declared once. The docs and image workflows, and the docs
that ran a single file, now select tests by module path.

Validation: cargo ci passes every step (1032 tests, then 96 lifecycle
tests). The build tests pass with and without the sdk feature, and the
runtime tests with and without execution. The workflow selections run
the same tests: the image job's bake:: (7) and the docs job's docs::
(5). Across the workspace, test binaries fell from 133 (22.5 GB) to 26
(3.5 GB). A workspace rebuild after one SDK change takes 10-11 s
instead of 38 s, and listing every test takes 0.85 s instead of 36 s.
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 9c9f693 into v1 Oct 5, 2026
16 checks passed
@cv
cv deleted the test/simplify-suites branch October 5, 2026 07:04
bowenzhu21 added a commit to bowenzhu21/NemoClaw that referenced this pull request Oct 5, 2026
v1 now links each crate's tests into one integration binary (NVIDIA#12613).
This branch's test files are unchanged by the merge.

Validation on dcbf45c with these changes, Linux ARM64 (Colima), bundle
built from this tree: nextest ci profile 1032 passed, lifecycle profile
96 passed, doc tests, cargo fmt --check, and Clippy -D warnings pass.
docker_provider_proxy 1/1, CPU runtime 2/2, ollama_cache 3/3,
cache_provider 5/5, lifecycle test 5/5, run through the integration
binary.

Signed-off-by: Bowen Zhu <[email protected]>
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance labels Oct 6, 2026
@cv cv added the v1 NemoClaw v1 branch label Oct 12, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants