Centralize the test filtering logic to test_description_m - #91
Merged
Conversation
This commit introduces the test_harness_t and test_fixture_t derived types and uses them to refactor and simplify the test-suite driver program: test/main.F90.
This commit reduces the amount of code that end users must write by moving the reporting of the final tally of test passes, test count, and skipped tests to the test_harness_t's "report" type-bound procedure.
This commit the code that checks whether the test suite is running in GitHub CI and checks whether the user requested to run the command_line_t tests. The code is moved from the test-suite driver to the actual test, which further simplifies the test-suite main program.
This commit adds a binary operator that produces a test_diagnosis_t result when applied to a logical operand.
Caveat: The newly refactored test/main.f90 program causes an ICE with gfortran 13.4.
…e into test-harness-feature
move pointer declarations & definitions outside a block construct
also delete redundant example
Also switch file to lower-case .f90 extension because the preprocessor is no longer needed.
This commit prepares for moving the test-filtering logic to one central location in test_description_s rather than having versions of the logic distributed across all tests. Because the deprecated vector_test_description_t is convoluted due to preprocessor directives, extracting the filter from that file would be challenging, which motivates the removal. This is a breaking change for any codes that use vector_test_description_t.
This commit further simplifies the code users must write inside test_t results() functions. All test-filtering logic is now transparent.
Member
|
Is this PR meant to subsume PR #86? |
bonachea
requested changes
Aug 12, 2025
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
bonachea
approved these changes
Aug 13, 2025
bonachea
left a comment
Member
There was a problem hiding this comment.
LGTM based on quick skim of the sources
This was referenced Aug 13, 2025
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.
This PR lifts the previous burden on users to write statements that filter the set of test to run based on the value of the command-line flag
--contains.