feat(test): add parsing support for args field in [[test]] manifest#1276
Open
ZainabTravadi wants to merge 1 commit intofortran-lang:mainfrom
Open
feat(test): add parsing support for args field in [[test]] manifest#1276ZainabTravadi wants to merge 1 commit intofortran-lang:mainfrom
ZainabTravadi wants to merge 1 commit intofortran-lang:mainfrom
Conversation
- Extend test_config_t with args(:) - Parse args from fpm.toml in new_test - Add validation for array of strings - Add regression tests for valid, missing, and invalid cases This change only affects manifest parsing and does not modify execution behavior.
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
This PR adds support for parsing an optional
argsfield in[[test]]entries infpm.toml.Example:
The parsed values are stored in
test_config_tas an allocatable string array.Changes
Extend
test_config_twithargs(:)Add
get_argshelper for parsing and validationUpdate
new_testto parse theargsfieldUpdate allowlist to accept
"args"Add regression tests for:
argsparsingargsfieldargsinputBehavior
argsis optionalScope
This PR only adds manifest parsing support.
It does not modify:
Execution-level integration can be handled in a follow-up PR.
Motivation
Currently,
[[test]]entries do not support passing command-line arguments, limiting flexibility for parameterized tests.This change introduces a small, backward-compatible improvement aligned with modern build system capabilities.
Testing
Added regression tests in
test_manifest.f90:test-args→ verifies correct parsingtest-args-missing→ ensures optional behaviortest-args-typeerror→ validates error handlingAll existing tests pass.
Notes
Closes #1275