Improve Python system/unit tests to enable running anywhere #2984
Labels
bfb
bit-for-bit
devops
E.g., adding GitHub Workflows
test: python
Pass clm_pymods test suite plus Python sys/unit tests before merging
testing
additions or changes to tests
Milestone
There are some things preventing us from running the Python system and unit tests anywhere other than the NCAR clusters (or at least machines not specified in CIME's
config_machines.xml
). Aside from being a continuity risk, this means that we can't run them as GitHub workflows. This issue will serve as a parent for some thoughts I've had but haven't necessarily yet investigated.Unit tests failing on my Mac:
test_append_user_nl_step2
: PermissionError atos.mknod(ufile)
(Fix need/checks for inputdata path in subset_data and Python testing #2985)test_check_args_outsurfdat_provided
:inputdata directory does not exist
(Fix need/checks for inputdata path in subset_data and Python testing #2985)test_derecho_mpirun
:ERROR: Undefined env var 'LMOD_ROOT'
. This one probably just needs to be skipped if not on Derecho, but it should throw a warning. (Only run test_derecho_mpirun Python unit test on Derecho #2987)test_inputdata_setup_files_basic
:inputdata directory does not exist
(Fix need/checks for inputdata path in subset_data and Python testing #2985)test_run_phase
: PermissionError inSSPCaseFake.create_clone()
atos.mknod(os.path.join(newcase, "user_nl_clm"))
(Fix need/checks for inputdata path in subset_data and Python testing #2985)These system tests fail without
nco
loaded, which complicates testing, especially on systems without it installed (#2988):TestSysMeshMaskModifier.test_allInfo
TestSysMeshMaskModifier.test_modifyMesh
The following system tests fail on my Mac (with
nco
loaded), but I don't have time at the moment to investigate them. A quick look suggests they're probably all due to my machine's name not being in CIME'sconfig_machines.xml
file. If that's the case, I think two changes should be made: (1) add a entry in that file for GitHub runners and (2) catch those errors in our tests and throw a warning instead if no machine is found.TestSysMeshMaskModifier.test_allInfo
TestSysMeshMaskModifier.test_modifyMesh
TestSysRunTower.test_ad_site
TestSysRunTower.test_one_site
TestSysRunTower.test_overwrite
TestSysRunTower.test_plumber_site
TestSysRunTower.test_setup_only
TestSysRunTower.test_xmlchange
The text was updated successfully, but these errors were encountered: