File tree Expand file tree Collapse file tree
.github/workflows/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,9 +29,13 @@ for shell in ${SHELLS[@]}; do
2929 echo RUNNING TESTS FOR SHELL: $shell
3030 echo = | awk ' NF += (OFS = $_) + 100'
3131 if [[ ! " ${TEST_SHELLS[*]} " =~ [[:space:]]${shell} [[:space:]] ]]; then
32- # ## EXCEPTION FOR CSH ###
3332 echo -e " \033[33mWe don't now how to test the shell '$shell ', PRs are Welcome.\033[0m"
3433 else
34+ if [ " $shell " = " csh" ]; then
35+ # make sure our .cshrc is empty before we begin as we will clobber it
36+ [ -f " ~/.cshrc" ] && mv " ~/.cshrc" " ~/.cshrc_orig"
37+ fi
38+
3539 # TEST 1: Source Script and check Module Output
3640 expected=" Module for EESSI/$EESSI_VERSION loaded successfully"
3741 assert " $shell -c 'source init/lmod/$shell ' 2>&1 " " ${expected} "
@@ -105,6 +109,12 @@ for shell in ${SHELLS[@]}; do
105109
106110 # End Test Suite
107111 assert_end " source_eessi_$shell "
112+
113+ if [ " $shell " = " csh" ]; then
114+ # Restore our .cshrc
115+ [ -f " ~/.cshrc_orig" ] && mv " ~/.cshrc_orig" " ~/.cshrc"
116+ fi
117+
108118 fi
109119done
110120
You can’t perform that action at this time.
0 commit comments