acc: surface tool-version checks as a TestAccept/prerequisites subtest#5712
Open
pietern wants to merge 2 commits into
Open
acc: surface tool-version checks as a TestAccept/prerequisites subtest#5712pietern wants to merge 2 commits into
pietern wants to merge 2 commits into
Conversation
The acceptance prerequisite checks (jq, uv, ruff, python) ran inline in TestAccept, so a stale or missing tool failed as a bare TestAccept, which says nothing about the cause. Run them in a TestAccept/prerequisites subtest so the failure names the actual problem. Split EnsurePython into RequirePython (pure version check, safe in the subtest) and ConfigurePython (the PATH side effect). ConfigurePython runs on the parent TestAccept t after the subtest passes: it prepends to PATH via t.Setenv and uses t.TempDir, both of which are torn down when their test returns, so running it from a subtest would revert the PATH change before the rest of the suite runs. Co-authored-by: Isaac
Contributor
Waiting for approvalBased on git history, these people are best suited to review:
Eligible reviewers: Suggestions based on git history. See OWNERS for ownership rules. |
ConfigurePython's PATH side effect is documented on ConfigurePython itself; it is not a concern of requirePrerequisites. Co-authored-by: Isaac
Collaborator
Integration test reportCommit: 27237fb
21 interesting tests: 13 SKIP, 7 KNOWN, 1 RECOVERED
Top 5 slowest tests (at least 2 minutes):
|
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.
The acceptance prerequisite checks (jq, uv, ruff, python) ran inline in
TestAccept, so a stale tool failed as a bareTestAcceptthat says nothing about the cause. This runs them in aTestAccept/prerequisitessubtest so the failure names the problem.EnsurePythonis split intoRequirePython(the check, run in the subtest) andConfigurePython(the PATH side effect).ConfigurePythonruns on the parenttafter the subtest, since itst.Setenv/t.TempDirwould be torn down at a subtest's end.Follow-up to #5698.
This pull request and its description were written by Isaac.