-
Notifications
You must be signed in to change notification settings - Fork 77
Testing
ESMF is tested on many platforms and compiler combinations on a nightly basis. Go here to view the latest test results: http://earthsystemmodeling.org/esmf-test-summary/
Visit the esmf-test-scripts README file for a description of how to configure a new machine and deploy the test system to collect results on a nightly basis.
- Library unit and system tests are included in the library source code itself and can be run through the ESMF build system after the library is built.
- Installation checks are sanity checks on the command line applications installed with ESMF.
- NUOPC prototypes are skeleton applications that exercise the NUOPC API and protocols.
- Extended regridding tests check the quality of ESMF regridding capabilities using a large number of combinations of realistic grids under higher processor counts.
- Bitwise reproducibility tests test whether changes to the framework are expected to change answers when used in applications. Currently this includes interpolation weights and indices.
- Memory leak tests use a runtime memory analysis tool to detect memory leaks in the library.
- Ad-hoc tests are written to study particular behaviors such as profiling a part of the system undergoing optimization. They are discarded after the implementation is complete.
Testing levels provide a way to easily communicate how extensively a particular version of ESMF has been tested, and by implication, the expected degree of stability. In general, smaller testing levels rely on faster and more localized test procedures to maximize development productivity. Higher testing levels require broader, more comprehensive, and more expensive testing procedures in order to ensure maximum portability, stability, and consistency of the framework.
Level | Criteria | Method |
---|---|---|
1 |
PASS if local branch testing in the developer's environment using
make check reports no failures.
(Assumes unit and/or system tests have been implemented capturing the new features or fix.)
|
Manual execution by developer |
2 |
PASS if multiple OS and compiler configurations pass level 1 testing on the
feature branch or the develop branch.
|
Continuous Integration (CI) when pushed to branch |
3 | PASS if a broad range of compiler and MPI combinations pass: (1) library unit and system tests, (2) NUOPC prototypes, and (3) extended regridding tests. | Automated "nightly" regression test scripts on a range of HPC platforms. |
4 | PASS if successfully tested in production (or near-production) environment(s) with target application(s) and all bit-reproducibility tests pass. | Manual execution of application in production environment. (May require customer assistance.) |
Test Coverage is run automatically through CircleCI on approval by the user. After a commit, on CircleCI find the run-test-coverage
job under the test-coverage-commit
workflow and click on the ARTIFACTS tab. The test coverage html files are available from there in a zip file for local download, if needed. The html files are also automatically pushed to the esmf-test-artifacts repo.
- Html files are pushed to test_coverage in the esmf-test-artifacts repository.
API Changes is run automatically through CircleCI on approval by the user. After a commit, on CircleCI find the run-api-change
job under the api-change-commit
workflow and click on the ARTIFACTS tab. The api change and diff files of two different tags are available from there in a zip file for local download, if needed. The files are also automatically pushed to the esmf-test-artifacts repo.
- Api changes and diff files are pushed to api_change in the esmf-test-artifacts repository.
The CircleCI job about uses a set of Docker images that include all the dependencies for building the docs. Pre-built images are available on the ESMF DockerHub. To run the test_coverage and api_change script locally, use the docker commands below. (Otherwise, you will need to set up all the doc generation dependencies locally, which is quite complex.) The steps below are based on the automated commands seen in the CircleCI config.yml configuration file.
# install docker if not available, or use docker02.cgd.ucar.edu
# start with an empty working directory
cd /path/to/working/dir
# get docker image recipe for building docs
git clone https://github.com/ESCOMP/ESCOMP-Containers.git
# build the image (set ESMF_BRANCH to desired branch from which to run test coverage)
docker build -t "esmf/test-coverage:develop" --file "ESCOMP-Containers/ESMF/test_coverage/Dockerfile" --build-arg ESMF_BRANCH="develop" --build-arg DOCKER_NAMESPACE="esmf" --no-cache .
# copy the generated docs out of the container to a local directory
# /path/to/working/dir should be an absolute path on your local machine where the html files will be copied
docker run -v /path/to/working/dir:/host-machine esmf/test-coverage:develop cp -r /artifacts /host-machine
# Similarly for API changes
# build the image (set ESMF_BRANCH to desired branch from which to run api changes)
# API changes is used to see change between two different tags TAG1 by default is "develop" and TAG2 is passed as an argument
docker build -t "esmf/api-change:develop" --file "ESCOMP-Containers/ESMF/API_changes/Dockerfile" --build-arg ESMF_BRANCH="develop" --build-arg DOCKER_NAMESPACE="esmf" --build-arg TAG2="ESMF_8_0_1" --no-cache .
# copy the generated docs out of the container to a local directory
# /path/to/working/dir should be an absolute path on your local machine where the .out files will be copied
docker run -v /path/to/working/dir:/host-machine esmf/api-change:develop cp -r /artifacts /host-machine
ESMPy testing requires access to data files. These files can be downloaded either from the ESMF website using the make download
command (wget is required), or from the esmf-test-data github lfs repository:
git clone [email protected]:esmf-org/esmf-test-data.git
Note that the large file support is a paid service through github, so this strategy should be reserved for testing environments that require batch job submission, because they require cloning the test data on the login node prior to submitting a job to install and test esmpy on the compute nodes. When using this method for accessing the test data, the following environment variable must be set to the grids
directory of the clone to esmf-test-data
:
export ESMPY_DATA_DIR=<clone-of-esmf-test-data-repo>/grids
- Repository
- Documentation
- Testing
- Release Procedure
- Updating Copyright Year
- ESMF-managed machines
- ESMF web site
- Application Testing