diff --git a/utils/python/CIME/case_setup.py b/utils/python/CIME/case_setup.py index f65293eee59..89af0208788 100644 --- a/utils/python/CIME/case_setup.py +++ b/utils/python/CIME/case_setup.py @@ -214,15 +214,7 @@ def _case_setup_impl(case, caseroot, clean=False, test_mode=False, reset=False): logger.info("If an old case build already exists, might want to run \'case.build --clean\' before building") - # Create test script if appropriate - # Short term fix to be removed when csh tests are removed - if os.path.exists("env_test.xml"): - if not os.path.exists("case.test"): - logger.info("Starting testcase.setup") - run_cmd_no_fail("./testcase.setup -caseroot %s" % caseroot) - logger.info("Finished testcase.setup") - - # Some tests need namelists created here (ERP) - so do this if are in test mode + # Some tests need namelists created here (ERP) - so do this if we are in test mode if test_mode or get_model() == "acme": logger.info("Generating component namelists as part of setup") create_namelists(case) diff --git a/utils/python/CIME/preview_namelists.py b/utils/python/CIME/preview_namelists.py index 71aae65e856..48b87549d13 100644 --- a/utils/python/CIME/preview_namelists.py +++ b/utils/python/CIME/preview_namelists.py @@ -18,7 +18,6 @@ def create_dirs(case): rundir = case.get_value("RUNDIR") caseroot = case.get_value("CASEROOT") - docdir = os.path.join(caseroot, "CaseDocs") dirs_to_make = [] models = case.get_values("COMP_CLASSES") @@ -47,6 +46,11 @@ def create_namelists(case): """ case.flush() + # Needed in case user did case.build --clean-all + exeroot = case.get_value("EXEROOT") + if not os.path.exists(exeroot): + create_dirs(case) + casebuild = case.get_value("CASEBUILD") caseroot = case.get_value("CASEROOT") rundir = case.get_value("RUNDIR") @@ -100,8 +104,8 @@ def create_namelists(case): logger.info(output) # refresh case xml object from file case.read_xml() - logger.info("Finished creating component namelists") + logger.info("Finished creating component namelists") # Save namelists to docdir if (not os.path.isdir(docdir)): @@ -112,7 +116,6 @@ def create_namelists(case): except (OSError, IOError) as e: expect(False, "Failed to write %s/README: %s" % (docdir, e)) - for cpglob in ["*_in_[0-9]*", "*modelio*", "*_in", "*streams*txt*", "*stxt", "*maps.rc", "*cism.config*"]: for file_to_copy in glob.glob(os.path.join(rundir, cpglob)):