-
Notifications
You must be signed in to change notification settings - Fork 214
Testing
Before making a Pull Request to the ESCMI/CIME github, test your changes.
CIME uses doctest and unittest for unit testing, and unittest for regression tests. All of these tests can be run at once by running scripts_regression_tests.py.
Required
Run the regression test suite.
cd to utils/python/tests ::
./scripts_regression_tests.py
This will run X and A system tests (the same as what you get from running ./create_test cime_developer
) in addition to the python-specific tests. If you want to skip the system tests, you can add --fast
, but running the system tests is required prior to making a pull request.
** On Yellowstone **
- Set the CIME_MODEL to cesm in the environment
- Make sure you have modules git/2.3.0, python/2.7.7 and pylint/1.6.4 loaded
- Run using execca to get a caldera node, tests will not run on login nodes
Recommended
Run pylint on files you modified. We have provided a tool to help with this called "code_checker" that lives in scripts/Tools. It supports checking the full code base in parallel and checking individual files. It also encapsulated the pylint settings that the team has agreed upon.
Continuous Intgeration Testing
CIME uses Jenkins to run scripts_regression_tests nightly. Latest results are on http://my.cdash.org/index.php?project=CIME.
-
Run the X and A system tests with ::
./create_test cime_developer
Note: The list of cime_developer tests is defined in cime/utils/python/update_acme_tests.py
As noted under "Changes to python", the cime_developer system tests are run automatically if you run scripts_regression_tests.py without the --fast
argument - so if you have already run that, you do not have to separately run the above command.
- If any changes have been made to Fortran code in share/ or driver_cpl/, then run cime unit tests: From the top-level directory in cime, follow the instructions in README.unit_testing (currently only works out-of-the-box on yellowstone).
In addition to CIME standalone testing there is testing associated with each of the CIME models - ACME and CESM. The workflows for each modeling group are a little different and are described below: