From 7d25f695442f6bee030b7fda1c0962491755ebc9 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 2 Dec 2024 14:58:09 -0700 Subject: [PATCH] Small changes for working on Izumi, mention that NOT failing without conda is possible if the python environment has enough python packages loaded --- .../FatesSetupParamBuild/run_shell_commands_tests | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests index 12133de4d3..2d395f6658 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests @@ -17,9 +17,11 @@ conda_for_host() { module unload conda fi elif [[ "$host" =~ izumi.cgd.ucar.edu || "$host" =~ i*.cgd.ucar.edu ]] ; then - echo "Running on Izumi..." >&1 - . /usr/share/Modules/init/sh + if [ "$verbose" -eq "1" ]; then + echo "Running on Izumi..." >&1 + fi if [[ "$type" == "load" ]]; then + . /usr/share/Modules/init/sh module load lang/anaconda else module unload lang/anaconda @@ -35,7 +37,7 @@ handle_error() { return 1 } -# Expect that should should have run WITJ an error +# Expect that should should have run WITH an error expect_fail() { error=$1 msg=$2 @@ -145,7 +147,7 @@ test_main_without_conda() { # I think this is because there's a lot of output in main output=$(main >& /dev/null) error=$? - expect_fail "$error" "main should fail without conda" + expect_fail "$error" "main should fail without conda (this can work on machines that include enough python packages outside of conda ctsm_pylib)" conda_for_host "$host" "load" } @@ -185,4 +187,4 @@ test_log_msg_not_logged_if_debug_zero test_main_without_conda test_main_without_ctsm_pylib -echo -e "\n\nSuccessfully ran all the tests\n (Look for FAIL above for problems)" \ No newline at end of file +echo -e "\n\nSuccessfully ran all the tests (Look for FAIL above for problems)"