|
5 | 5 | paths: |
6 | 6 | - build_container.sh |
7 | 7 | - create_directory_tarballs.sh |
| 8 | + - create_lmodsitepackage.py |
8 | 9 | - EESSI-install-software.sh |
9 | 10 | - install_software_layer.sh |
10 | 11 | - load_easybuild_module.sh |
|
16 | 17 | paths: |
17 | 18 | - build_container.sh |
18 | 19 | - create_directory_tarballs.sh |
| 20 | + - create_lmodsitepackage.py |
19 | 21 | - EESSI-install-software.sh |
20 | 22 | - install_software_layer.sh |
21 | 23 | - load_easybuild_module.sh |
|
94 | 96 | ./eessi_container.sh --mode run --verbose /software-layer/create_directory_tarballs.sh 2023.06 |
95 | 97 | # check if tarballs have been produced |
96 | 98 | ls -l *.tar.gz |
| 99 | +
|
| 100 | + - name: test create_lmodsitepackage.py script |
| 101 | + run: | |
| 102 | + # bind current directory into container as /software-layer |
| 103 | + export SINGULARITY_BIND="${PWD}:/software-layer" |
| 104 | +
|
| 105 | + python3 create_lmodsitepackage.py . |
| 106 | + export LMOD_PACKAGE_PATH="$PWD/.lmod" |
| 107 | + # run some commands to make sure that generated Lmod SitePackage file works |
| 108 | + test_script="${PWD}/test_lmod_sitepackage.sh" |
| 109 | + echo '#!/bin/bash' > ${test_script} |
| 110 | + echo 'ml --config' >> ${test_script} |
| 111 | +
|
| 112 | + chmod u+x ${test_script} |
| 113 | +
|
| 114 | + ./eessi_container.sh --mode run --verbose /software-layer/run_in_compat_layer_env.sh /software-layer/test_lmod_sitepackage.sh 2>&1 | tee ${out} |
| 115 | + for pattern in "^Site Pkg location.*$PWD/.lmod/SitePackage.lua" "LMOD_SITEPACKAGE_LOCATION.*${PWD}/.lmod/SitePackage.lua"; do |
| 116 | + grep "${pattern}" ${out} || (echo "Pattern '${pattern}' not found in output!" && exit 1) |
| 117 | + done |
0 commit comments