@@ -315,3 +315,45 @@ jobs:
315315 module load "EESSI/${{matrix.EESSI_VERSION}}"
316316 GREP_PATTERN="Lmod is automatically replacing \"EESSI/${{matrix.EESSI_VERSION}}\" with \"${LOCAL_STACK_NAME}/${LOCAL_STACK_VERSION}\"."
317317 module load "${LOCAL_STACK_NAME}/${LOCAL_STACK_VERSION}" |& grep "${GREP_PATTERN}"
318+
319+ check_PS1_update_eessi_module :
320+ runs-on : ubuntu-24.04
321+ strategy :
322+ fail-fast : false
323+ matrix :
324+ EESSI_VERSION :
325+ - ' 2023.06'
326+ - ' 2025.06'
327+
328+ steps :
329+ - name : Check out software-layer repository
330+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
331+
332+ - name : Mount EESSI CernVM-FS repository
333+ uses : cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0
334+ with :
335+ cvmfs_config_package : https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
336+ cvmfs_http_proxy : DIRECT
337+ cvmfs_repositories : software.eessi.io
338+
339+ - name : Make sure we can use EESSI_UPDATE_PS1 to update PS1 in the EESSI module
340+ run : |
341+ # Initialise Lmod
342+ . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash
343+
344+ export MODULEPATH=init/modules
345+ # Set the relevant environment variable, load the EESSI module, and grep for what we expect in PS1
346+ export EESSI_MODULE_UPDATE_PS1=1
347+ # Need to set PS1 manually as we are in a non-interactive shell
348+ export PS1="mytest $"
349+ echo $PS1
350+ module load "EESSI/${{matrix.EESSI_VERSION}}"
351+ GREP_PATTERN="{EESSI/${{matrix.EESSI_VERSION}}} "
352+ # Pipe the PS1 variable into grep to check for the pattern
353+ echo "$PS1"
354+ echo "$PS1" | grep "$GREP_PATTERN"
355+
356+ # Let's also check that quiet mode works
357+ module load "EESSI/${{matrix.EESSI_VERSION}}" |& grep -q "Module for EESSI/${{matrix.EESSI_VERSION}} loaded successfully"
358+ export EESSI_MODULE_QUIET_LOAD=1
359+ ! module load "EESSI/${{matrix.EESSI_VERSION}}" |& grep -q "Module for EESSI/${{matrix.EESSI_VERSION}} loaded successfully"
0 commit comments