Repository navigation
Reject test programs that would overwrite executables - #1036
Draft
jepharaujo wants to merge 1 commit into
Draft
jepharaujo wants to merge 1 commit into
jepharaujo wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Summary
Rejects discovered test programs that would overwrite a package executable. The error identifies the test, the target and the shared path before the planner writes build output. The testing guide and specification document the guard.
Fixes #1028.
Criteria
TestTargets/*on macOS. The two new cases exercise Darwin and Windows executable naming and the difference between nested test paths and workspace linker placement.mcpp testcommand while it was building unrelated suites, so the targeted run used the unit executable produced by its Ninja graph. The full suite and native Linux and Windows runs are left to CI.Intersections
TestTargets/ATestDirectoryCannotReplaceThePackagesExecutableand the root CLI regressionTestTargets/MemberTestPathsKeepTheirDirectoriesand the workspace CLI regressionCompatibility
Projects with distinct test and program paths continue to work as before. A colliding directory-mode test now fails during planning, preserves existing build output and identifies what can be renamed. No migration is required.
Checks before merging
python3 .github/tools/check_workflow_assertions.pypasses.git log origin/main..HEAD -i --grep='Co-Authored-By'prints nothing.OpenAI Codex assisted with implementation and validation.