Testing: BUILD and WORK macros for controlling test output#563
Testing: BUILD and WORK macros for controlling test output#563marshallward wants to merge 3 commits into
Conversation
This patch replaces the WORKSPACE macro with two macros for BUILD and WORK. It also makes the following smaller changes: * deps/ is now defined by the DEPS macro. If unset, deps/ is placed in the BUILD directory. * results/ is moved into WORK, * Compiler flags which track directories now use $(abspath ...) to allow for arbitrary paths. * GitHub CI paths were adjusted to support these new settings. This work will enable testing of multiple FMS libraries in our CI.
Refactor the various DO_* flags to use ifdef, which checks if the flags have any value, rather than explicitly looking for "true". This follows the Make convention of an unset value corresponding to False. There is also some minor refactoring, such as pruning of redundant comments.
There appears to be a legacy macro and comments related to building the coupled driver object files with mkmf. To the best of my knowledge, this is no longer used, and it appears to build correctly when removed, so I am removing all reference to mkmf from this section. However, I will pack it into a separate commit, in case it is actually needed somewhere ^_^.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev/gfdl #563 +/- ##
============================================
+ Coverage 36.88% 37.20% +0.31%
============================================
Files 271 271
Lines 79231 80353 +1122
Branches 14712 14985 +273
============================================
+ Hits 29228 29894 +666
- Misses 44587 44902 +315
- Partials 5416 5557 +141 ☔ View full report in Codecov by Sentry. |
|
|
||
| # Default is to place work/ and results/ in current directory | ||
| WORKSPACE ?= . | ||
| BUILD ?= build |
There was a problem hiding this comment.
For a user on gaea keeping the source in /home, I think this now requires providing two macros. Instead if you kept WORKSPACE and adding BUILD and WORK like this:
WORKSPACE ?=
BUILD ?= $(WORKSPACE)build
WORK ?= $(WORKSPACE)work
You would retain the old functionality and provide the fine-grain control you want for the CI
There was a problem hiding this comment.
Is anyone else using WORKSPACE? I am asking because I deliberately do not want to anchor these paths together in any way.
There was a problem hiding this comment.
I do, but I could also achieve the same with config.mk ...
|
There are several errors in this PR; the If I can't sort it out quickly, then I will close this and address it at a later time. |
This patch replaces the
WORKSPACEmacro with two macros forBUILDandWORK. It also makes the following smaller changes:deps/is now defined by theDEPSmacro. If unset,deps/is placed in theBUILDdirectory.results/is moved intoWORK,Compiler flags which track directories now use
$(abspath ...)to allow for arbitrary paths.GitHub CI paths were adjusted to support these new settings.
This work will enable testing of multiple FMS libraries in our CI.
There are additional changes to the
DO_*user control flags of.testing/Makefile. Now, any value is regarded as "true", rather than just the valuetrue. This is more consistent with how Make interprets macro flags.Finally, an old macro for setting up mkmf in the coupled build tests has been removed. Since I was unsure if this would break anything outside of my control, I moved it to a separate commit.