Skip to content

Commit 6549478

Browse files
committed
fix init script for the test
1 parent 1928e7a commit 6549478

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/scripts/test_init_scripts.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,15 @@ for shell in ${SHELLS[@]}; do
166166
assert_raises 'echo "$TEST_EESSI_EXPLICIT_NO_PS1_UPDATE" | grep "$pattern"' 1
167167
assert_raises 'echo "$TEST_EESSI_EXPLICIT_NO_PS1_UPDATE_CALLED_TWICE" | grep "$pattern"' 1
168168
# Also check complex prompts, and unloading/purging the EESSI module
169+
sed 's/__EESSI_VERSION_DEFAULT__/2023.06/' init/lmod/sh >init/lmod/sh.test
170+
ln -sr init/lmod/sh.test init/lmod/bash.test
171+
ln -sr init/lmod/sh.test init/lmod/ksh.test
172+
ln -sr init/lmod/sh.test init/lmod/zsh.test
169173
prompt="\$(echo '\['✘) $ "
170174
promptstr="\[✘ $ "
171175
updated_promptstr="{EESSI/${EESSI_VERSION}} \[✘ $ "
172-
TEST_EESSI_PS1_UPDATE=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; export EESSI_CVMFS_REPO=$PWD ; export LMOD_IGNORE_CACHE=1 ; . init/lmod/$shell >/dev/null 2>&1 ; echo \"\$PS1\"")
173-
TEST_EESSI_PS1_REVERT=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; export EESSI_CVMFS_REPO=$PWD ; export LMOD_IGNORE_CACHE=1 ; . init/lmod/$shell >/dev/null 2>&1 ; module purge; echo \"\$PS1\"")
176+
TEST_EESSI_PS1_UPDATE=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; export EESSI_CVMFS_REPO=$PWD ; . init/lmod/$shell.test >/dev/null 2>&1 ; echo \"\$PS1\"")
177+
TEST_EESSI_PS1_REVERT=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; export EESSI_CVMFS_REPO=$PWD ; . init/lmod/$shell.test >/dev/null 2>&1 ; module purge; echo \"\$PS1\"")
174178
assert 'echo "$TEST_EESSI_PS1_UPDATE"' "$updated_promptstr"
175179
assert 'echo "$TEST_EESSI_PS1_REVERT"' "$promptstr"
176180
fi

0 commit comments

Comments
 (0)