Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: Generalized testing rules #1502

Merged
merged 4 commits into from
Oct 1, 2021

Conversation

marshallward
Copy link
Collaborator

This PR adds new rules and features to the MOM6 testing Makefile:

  • New hooks are provided to control the list of builds, configurations, and active tests.
    • BUILDS for executables
    • CONFIGS for configurations (tc1, tc2, etc)
    • TESTS for test types (grid, rotate, etc)
    • Tests no longer need to begin with tc and can be added to CONFIGS, although this is still the default behavior.
  • Rules for new groupings of tests have also been provided:
    • test.dim can now be used to run all dimensional tests
    • Individual configurations can now be tested, e.g.:
      • tc2 will run all tc2 tests
      • tc2.grid will run the symmetric/asymmetric grid tests on tc2
      • tc2.dim will run all dimension tests on tc2
      • tc2.dim.q will run the Q-dimensional tests on tc2
        NOTE: tc2will run diagnostic tests, but the others will not; use tc2.grid.diag to run them, for example.
  • Many of the old "plural" groups have been renamed, matching the single-text format; e.g. test.rotations is now test.rotate.
  • Many of the wildcard (%) rules have been redefined as explicitly over the tests.
  • The repro build was incorrectly being built, even when DO_REPRO_TESTS was unset. This has been fixed.
  • make clean now deletes both build and deps (including FMS), thereby reversing the behavior of Makefile.
    • A new make.build rule is provided to only delete the MOM6 builds

The GitHub Actions tests have also been updated to use the renamed

`make all` (the default rule) builds the executables specified by
`BUILDS`.  This was hard-coded, but can be promoted to a user-defined
configuration for user-defined builds.

This should be seen as a simple alias to `make build/${b}/MOM6`.

The `repro` build was also incorrectly in the list, even though it was
also conditionally added.  It has been removed from the default list.

A similar modification was made to CONFIGS, which select the "tc"
experiments.  The default is still to do a `tc*` glob.

Documentation was also added.
Macros for generating individual rules for the tc's were added.  This
was generalized to support the contents of CONFIGS, which is now a
user-defined parameter.

The wildcard rules have now been replaced with more explicit rules, in
preparation for the merge of TESTS and TEST_TYPES.

A method for excluding tests has been added for tc3 support, and could
be extended to future tests.
The Makefile rules were extended to support multiple iterations of
dimension testing.  Examples shown below:

* test.dim      Run all dimension tests
* test.dim.l    Run all L dimension tests
* tc2.dim       Run all tc2 dimension tests
* tc2.dim.l     Run the tc2 L dimension test

Also, TESTS and TEST_TYPES were merged into a single variable, and the
old plural test names (e.g. test.grids) were removed and are now handled
as singular tests => test.grid.

The GitHub actions testing was updated to reflect these new non-plural
names.  It will take some iteration to confirm that they are working.
@codecov
Copy link

codecov bot commented Sep 29, 2021

Codecov Report

Merging #1502 (ff3e265) into dev/gfdl (8e4b4bc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           dev/gfdl    #1502   +/-   ##
=========================================
  Coverage     29.06%   29.06%           
=========================================
  Files           237      237           
  Lines         71645    71645           
=========================================
  Hits          20822    20822           
  Misses        50823    50823           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e4b4bc...ff3e265. Read the comment docs.

Copy link
Collaborator

@adcroft adcroft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • make clean.build was a good compromise to our debate about targets for cleaning
  • alignment of target names (removing plurals) is much nicer
  • removing "repro" from BUILDS makes interactive testing quicker

@adcroft adcroft merged commit bb9cb35 into mom-ocean:dev/gfdl Oct 1, 2021
@marshallward marshallward deleted the test_rules_v2 branch October 20, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants