Add checks for duplicated section names - #94
Merged
ryanmrichard merged 2 commits intoDec 4, 2023
Merged
Conversation
This was referenced Nov 30, 2023
…ames-do-not-clobber-already-defined-units
ryanmrichard
approved these changes
Dec 4, 2023
ryanmrichard
deleted the
89-add-checks-to-ensure-test-and-section-names-do-not-clobber-already-defined-units
branch
December 4, 2023 14:47
|
🚀 [bumpr] Bumped! New version:v0.1.12 Changes:v0.1.11...v0.1.12 |
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.
Is this pull request associated with an issue(s)?
Fixes #89
Also fixes a previously-unknown bug where subsections of an
EXPECTFAILsection would not run due to not having their section names being set in the expectfail template.Description
This PR adds some safety checks to ensure that sections do not have the same name in the same scope. It has caught two such instances of duplicated names in CMakePP, which I will be fixing in a different PR. I don't think duplicated names would cause internal issues after #91 for regular sections, but
EXPECTFAILcould encounter some issues due to relying on section names for whether or not to execute them. TheEXPECTFAILsystem should be changed to not rely on the names, but for now, it's fine.While writing the test to verify the behavior of this new check, I discovered that
EXPECTFAILsections would not run subsections, since their IDs are not set in the expectfail template (are not discovered until running in the subprocess). This PR fixes the issue by adding a new global that is set in the template specifying the target section that the subprocess is supposed to run. Any sections that have the target as a parent, either directly or indirectly, will be enabled and ran as normal.