Skip to content

Commit 05bdcea

Browse files
committed
Add a system test that runs the CESM_share unit tests
Requires the CIME changes in ESMCI/cime#4895.
1 parent 5fcc12e commit 05bdcea

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""
2+
Implementation of the share code FUNIT test.
3+
4+
This "system" test runs the share code's Fortran unit tests. We're abusing the system test
5+
infrastructure to run these, so that a run of the test suite can result in the unit tests
6+
being run as well.
7+
8+
Grid and compset are irrelevant for this test type.
9+
"""
10+
11+
import os
12+
from CIME.SystemTests.funit import FUNIT
13+
from CIME.XML.standard_module_setup import *
14+
15+
logger = logging.getLogger(__name__)
16+
17+
18+
class FUNITSHARE(FUNIT):
19+
def __init__(self, case):
20+
FUNIT.__init__(self, case)
21+
22+
def get_test_spec_dir(self):
23+
return os.path.join(self._case.get_value("SRCROOT"), "share")
24+
25+
def get_extra_run_tests_args(self):
26+
return '--cmake-args " -DUNITTESTS=ON -DUSE_CIME_MACROS=ON"'

cime_config/config_tests.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
3+
<!--
4+
This defines various CESM-specific system tests
5+
-->
6+
7+
<config_test>
8+
9+
<test NAME="FUNITSHARE">
10+
<DESC>Run the share code's Fortran unit tests. Grid and compset (and most case settings) are ignored.</DESC>
11+
<INFO_DBUG>1</INFO_DBUG>
12+
<STOP_OPTION>ndays</STOP_OPTION>
13+
<STOP_N>11</STOP_N>
14+
<CHECK_TIMING>FALSE</CHECK_TIMING>
15+
<DOUT_S>FALSE</DOUT_S>
16+
</test>
17+
18+
</config_test>

cime_config/testlist_allactive.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,13 @@
251251
<option name="comment">Include a short debug test using the atm grid for aoflux calculations rather than the default xgrid.</option>
252252
</options>
253253
</test>
254+
<test name="FUNITSHARE_P1x1" grid="ne30pg3_t232" compset="B1850C_LTso">
255+
<machines>
256+
<machine name="derecho" compiler="intel" category="prealpha"/>
257+
</machines>
258+
<options>
259+
<option name="wallclock">00:30:00</option>
260+
<option name="comment">This test runs the CESM_share Fortran unit tests. We're abusing the system test infrastructure to run these, so that a run of the test suite results in the unit tests being run as well. These unit tests are run as a GitHub action for each share PR, so this system test is less about catching code problems and more about making sure the unit testing infrastructure continues to work in each CESM tag. Grid and compset are irrelevant here.</option>
261+
</options>
262+
</test>
254263
</testlist>

0 commit comments

Comments
 (0)