diff --git a/utils/python/CIME/SystemTests/homme.py b/utils/python/CIME/SystemTests/homme.py index bca5858b708b..fdd17458fc2a 100644 --- a/utils/python/CIME/SystemTests/homme.py +++ b/utils/python/CIME/SystemTests/homme.py @@ -3,7 +3,7 @@ """ from CIME.XML.standard_module_setup import * from CIME.SystemTests.system_tests_common import SystemTestsCommon -from CIME.build import post_build, case_build +from CIME.build import post_build import shutil diff --git a/utils/python/CIME/SystemTests/system_tests_common.py b/utils/python/CIME/SystemTests/system_tests_common.py index dd0503edecbc..79506006bba8 100644 --- a/utils/python/CIME/SystemTests/system_tests_common.py +++ b/utils/python/CIME/SystemTests/system_tests_common.py @@ -432,7 +432,7 @@ def build_phase(self, sharedlib_only=False, model_only=False): os.chmod(modelexe, 0755) - post_build(self._case, []) + build.post_build(self._case, []) def run_phase(self): self.run_indv(suffix=None) diff --git a/utils/python/CIME/build.py b/utils/python/CIME/build.py index 0beae8c8b3e9..5d1fed4cb272 100644 --- a/utils/python/CIME/build.py +++ b/utils/python/CIME/build.py @@ -10,7 +10,8 @@ logger = logging.getLogger(__name__) def stringify_bool(val): - expect(type(val) is bool, "Wrong type") + val = False if val is None else val + expect(type(val) is bool, "Wrong type for val '%s'" % repr(val)) return "TRUE" if val else "FALSE" ############################################################################### @@ -232,10 +233,10 @@ def case_build(caseroot, case, sharedlib_only=False, model_only=False): os.environ["CAM_CONFIG_OPTS"] = cam_config_opts if cam_config_opts is not None else "" os.environ["PIO_CONFIG_OPTS"] = pio_config_opts if pio_config_opts is not None else "" os.environ["OCN_SUBMODEL"] = ocn_submodel if ocn_submodel is not None else "" - os.environ["PROFILE_PAPI_ENABLE"] = stringify_bool(profile_papi_enable) if profile_papi_enable is not None else "" - os.environ["CLM_USE_PETSC"] = stringify_bool(clm_use_petsc) if clm_use_petsc is not None else "" - os.environ["CISM_USE_TRILINOS"] = stringify_bool(cism_use_trilinos) if cism_use_trilinos is not None else "" - os.environ["MPASLI_USE_ALBANY"] = stringify_bool(mpasli_use_albany) if mpasli_use_albany is not None else "" + os.environ["PROFILE_PAPI_ENABLE"] = stringify_bool(profile_papi_enable) + os.environ["CLM_USE_PETSC"] = stringify_bool(clm_use_petsc) + os.environ["CISM_USE_TRILINOS"] = stringify_bool(cism_use_trilinos) + os.environ["MPASLI_USE_ALBANY"] = stringify_bool(mpasli_use_albany) # This is a timestamp for the build , not the same as the testid, # and this case may not be a test anyway. For a production @@ -269,9 +270,9 @@ def case_build(caseroot, case, sharedlib_only=False, model_only=False): # the future there may be others -- so USE_ALBANY will be true if # ANY of those are true. - use_albany = mpasli_use_albany + use_albany = stringify_bool(mpasli_use_albany) case.set_value("USE_ALBANY", use_albany) - os.environ["USE_ALBANY"] = stringify_bool(use_albany) + os.environ["USE_ALBANY"] = use_albany # Load modules env_module = case.get_env("mach_specific")