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.
Some long overdue cleanup of some test classes and cases. The changes here are mostly focused on implementing file path checking/substitution to allow the tests to discover required input data from different initial working directories. Ultimately, this now allows
ctest
to run effectively and do both test discovery and execution. So from the repo root directory, one can do the following:Activate most all features for a build
make -B test_build -S . -DNETCDF_ACTIVE:BOOL=On -DBMI_C_LIB_ACTIVE:BOOL=On -DBMI_FORTRAN_ACTIVE:BOOL=On -DNGEN_ACTIVATE_PYTHON:BOOL=On -DNGEN_ACTIVATE_ROUTING:BOOL=On
Compile all targets (including activated tests for the various options)
Discover and run all built tests
cmake --build test_build --target test
The builds and tests can also be done via
make
, e.g.What is important to note here, is that we have a couple standard test targets we test often,
test_unit
andtest_all
, which have 152 and 128 total possible tests, for a combined 280 tests. (using the above build flags).When you run the entirety of the discoverable tests using
ctest
, there are 822 tests discovered! Even with the overlap in test_unit/test_all, there are clearly some test cases not be exercised frequently (some of where are fixed up in this PR).This should have no regression on existing testing workflows, but should allow for more comprehensive ones, and we may even want to revisit the automated action runners and consider using the ctest interface to discover and run tests.
Checklist
Target Environment support