Split long-running tests into more focused tests - #242
Open
bbannier wants to merge 4 commits into
Open
Conversation
timwoj
requested changes
Jul 23, 2026
| @@ -0,0 +1,33 @@ | |||
| # @TEST-EXEC: bash %INPUT | |||
Member
There was a problem hiding this comment.
Some comments in each "section" of this test might help clarify what each part is doing.
Member
Author
There was a problem hiding this comment.
Yeah, that would help, but also tells me that I should have broken this up further. I did that now so we have dedicated tests and no need to add sections, sorry for the churn. This forces us to copy %INPUT to more tests, but I think that makes sense for standalone tests (in contrast to introducing a say tests/scripts/setup which would couple stuff again and also make it harder to follow what is going on in each test).
tests.install still installs four different packages in one tests. Not sure we need section headers there, but could certainly add them. WDYT?
Extract each distinct scenario from the monolithic test: - `install-branch-default`: installs corge at the latest version on the default branch - `install-branch-explicit`: installs corge by explicit branch name - `install-version-latest`: installs grault at the latest version - `install-version-tag`: installs grault at a specific tag - `install-version-detached`: installs grault from a local path with detached HEAD - `install-version-commit-hash`: installs grault at a specific commit hash The remaining `tests.install` covers the four unconditional installs (foo, bar, baz, qux) that need no setup.
The original `tests.bundle` ran snapshot, `--manifest args`, and `--manifest file` bundle scenarios sequentially in one test. Extract each into its own test (`tests.bundle-snapshot`, `tests.bundle-args`, `tests.bundle-manifest`) with the tag-setup script inlined per test. The original `tests.bundle` is removed since all scenarios are covered by the new tests.
The original test ran four scenarios sequentially behind a single `bash %INPUT` setup. Extract each scenario (no-suggests baseline, upgrade via `zkg refresh`+`upgrade`, fresh install, bundle/unbundle) into its own test file with the repo-mutation setup inlined. The original `tests.metadata-suggests` is removed.
Mirror the same split applied to `tests.metadata-suggests`: extract the no-depends baseline, upgrade, install, and bundle/unbundle scenarios into separate test files with the repo-mutation setup inlined in each. The original `tests.metadata-depends` is removed.
bbannier
force-pushed
the
topic/bbannier/split-tests
branch
from
July 24, 2026 10:20
d7c7354 to
3fc2082
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Many of our tests check multiple behaviors at the same time. This not only makes the tests hard to follow and debug when something breaks (e.g., a test might stop before all behaviors are checked), but it also causes some tests to run for a very long time. This PR breaks up our longest running tests into more focused tests instead. I see no test suite runtime improvement from that on my machine, but IMO it still improves the overall situation.
Warning
All code changes in this branch were generated with Claude Sonnet 4.6. I reviewed all changes and am accountable.