Skip to content

Commit

Permalink
Remove no-longer-needed override
Browse files Browse the repository at this point in the history
run_phase in this version of cime exactly matches the override version
  • Loading branch information
billsacks committed Nov 1, 2018
1 parent a3d764a commit d0b502d
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions cime_config/SystemTests/funitctsm.py
Expand Up @@ -11,7 +11,6 @@
import os
from CIME.SystemTests.funit import FUNIT
from CIME.XML.standard_module_setup import *
from CIME.utils import append_testlog, get_cime_root

logger = logging.getLogger(__name__)

Expand All @@ -23,28 +22,3 @@ def __init__(self, case):
def get_test_spec_dir(self):
lnd_root = self._case.get_value("COMP_ROOT_DIR_LND")
return os.path.join(lnd_root, "src")

# TODO(wjs, 2018-10-28) For now, we're overriding run_phase with a slightly modified
# version that has a fix for the path to the unit_test_tool. Once we can point to an
# updated cime that has this fix in place, we should remove run_phase, relying on
# FUNIT's run_phase. At that point, we should also remove the import of append_testlog
# and get_cime_root, above.
def run_phase(self):

rundir = self._case.get_value("RUNDIR")
exeroot = self._case.get_value("EXEROOT")
mach = self._case.get_value("MACH")

log = os.path.join(rundir, "funit.log")
if os.path.exists(log):
os.remove(log)

test_spec_dir = self.get_test_spec_dir()
unit_test_tool = os.path.abspath(os.path.join(get_cime_root(),"scripts","fortran_unit_testing","run_tests.py"))
args = "--build-dir {} --test-spec-dir {} --machine {}".format(exeroot, test_spec_dir, mach)
stat = run_cmd("{} {} >& funit.log".format(unit_test_tool, args), from_dir=rundir)[0]

append_testlog(open(os.path.join(rundir, "funit.log"), "r").read())

expect(stat == 0, "RUN FAIL for FUNIT")

0 comments on commit d0b502d

Please sign in to comment.