CMEPS icon indicating copy to clipboard operation
CMEPS copied to clipboard

Add unit-testers for FORTRAN code in CMEPS

Open ekluzek opened this issue 1 year ago • 4 comments

In #429 I added new code and a unit-tester for it under the CTSM PR that uses it. I'm wondering if unit-testers is something that should be added to CMEPS? Initially maybe the way to go would be to have the unit-tester in CMEPS, but still use the CTSM infrastructure to build and run it?

@billsacks thoughts on this?

ekluzek avatar May 17 '24 14:05 ekluzek

I very much support the addition of unit tests where appropriate.

Currently there is some unit test infrastructure in CIME that drives the share code unit tests and used to drive the cpl7 unit tests... so it could make sense to integrate the driving of CMEPS into there.

billsacks avatar May 21 '24 20:05 billsacks

OK, sounds good.

In #429 I propose that I create a new test subdirectory under cesm/nuopc_cap_share and move the unit-tester I put under CTSM to there:

https://github.com/ESCOMP/CTSM/pull/2545/files#diff-d420afd07928ac2d86f444cd1a8d08a3161f479361f328f9b1db324059136ec1

For the CTSM PR I'll still build it as one of the CTSM unit-tests. I think this change will be easy for me to make.

In the future as you point out it would be good to have the infrastructure in CMEPS to run unit tests there. But, I'll let someone else figure that out and get it working.

How does that sound as a plan @billsacks?

ekluzek avatar May 21 '24 21:05 ekluzek

That sounds fine - thanks @ekluzek .

billsacks avatar May 21 '24 23:05 billsacks