Skip to content

Commit 56cb0d7

Browse files
committed
use csh workaround for other tests
1 parent e4fa51d commit 56cb0d7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/scripts/test_init_scripts.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,20 @@ for shell in ${SHELLS[@]}; do
5555
# Test 4: Load EasyBuild module and check version
5656
# eb --version outputs: "This is EasyBuild 5.1.1 (framework: 5.1.1, easyblocks: 5.1.1) on host ..."
5757
if [ "$shell" = "csh" ]; then
58-
command="$shell -c 'source init/lmod/$shell >& /dev/null; module load EasyBuild/${EXPECTED_EASYBUILD_VERSION}; eb --version | cut -d \" \" -f4'"
58+
echo "source init/lmod/$shell 2> /dev/null" > ~/.cshrc
59+
cat ~/.cshrc
60+
$shell -l <<< "alias"
61+
command="$shell -l <<< 'module load EasyBuild/${EXPECTED_EASYBUILD_VERSION}; eb --version | cut -d \" \" -f4'"
5962
else
6063
command="$shell -c 'source init/lmod/$shell 2>/dev/null; module load EasyBuild/${EXPECTED_EASYBUILD_VERSION}; eb --version | cut -d \" \" -f4'"
6164
fi
6265
assert "$command" "$EXPECTED_EASYBUILD_VERSION"
6366
# Test 5: Load EasyBuild module and check path
6467
if [ "$shell" = "csh" ]; then
65-
EASYBUILD_PATH=$($shell -c "source init/lmod/$shell >& /dev/null; module load EasyBuild/${EXPECTED_EASYBUILD_VERSION}; which eb")
68+
echo "source init/lmod/$shell 2> /dev/null" > ~/.cshrc
69+
cat ~/.cshrc
70+
$shell -l <<< "alias"
71+
EASYBUILD_PATH=$($shell -l "module load EasyBuild/${EXPECTED_EASYBUILD_VERSION}; which eb")
6672
else
6773
EASYBUILD_PATH=$($shell -c "source init/lmod/$shell 2>/dev/null; module load EasyBuild/${EXPECTED_EASYBUILD_VERSION}; which eb")
6874
fi

0 commit comments

Comments
 (0)