Skip to content

Commit

Permalink
lmod: update to 8.7.53
Browse files Browse the repository at this point in the history
Add a simple test for lmod component: just load /etc/profile.d/lmod.sh
to verify that it does not have syntax errors

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
martin-g committed Oct 18, 2024
1 parent 611b01f commit d3bcaab
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/admin/lmod/SPECS/lmod.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

Summary: Lua based Modules (lmod)
Name: %{pname}%{PROJ_DELIM}
Version: 8.7.37
Version: 8.7.53
Release: %{?dist}.1
License: MIT
Group: %{PROJ_NAME}/admin
Expand Down
5 changes: 5 additions & 0 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ if SPACK_ENABLED
endif


if LMOD_ENABLED
SUBDIRS += admin/lmod
endif


else # non root tests

if CHARLIECLOUD_ENABLED
Expand Down
2 changes: 1 addition & 1 deletion tests/admin/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ endif

if SLURM_ENABLED
TESTS += slurm-plugins
endif
endif
3 changes: 3 additions & 0 deletions tests/admin/lmod/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TESTS_ENVIRONMENT = BATS_NO_SUMMARY=1

TESTS = lmod
1 change: 1 addition & 0 deletions tests/admin/lmod/common
21 changes: 21 additions & 0 deletions tests/admin/lmod/lmod
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env -S bats --report-formatter junit --formatter tap
# -*-sh-*-

load ./common/test_helper_functions || exit 1
source ./common/functions || exit 1

if [ -s ./common/TEST_ENV ];then
source ./common/TEST_ENV
fi

setup() {
if [ -z "$MODULEPATH" ];then
. /etc/profile.d/lmod.sh || exit 1
fi
module purge || exit 1
}


@test "[lmod] test that the setup function passed" {
assert_success
}
5 changes: 5 additions & 0 deletions tests/ci/spec_to_test_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@
'',
'',
],
'components/admin/lmod/SPECS/lmod.spec': [
'',
'lmod',
''
],
}

# Check which base OS we are using
Expand Down
14 changes: 14 additions & 0 deletions tests/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ AC_ARG_ENABLE([spack],
[],[enable_spack=yes])
AM_CONDITIONAL(SPACK_ENABLED,test "x$enable_spack" = "xyes" )

#------------------------------------------------------------------------------------------
# lmod
AC_ARG_ENABLE([lmod],
[AS_HELP_STRING([--enable-lod],[Enable lmod tests (default=yes, root only)])],
[],[enable_lmod=yes])
AM_CONDITIONAL(LMOD_ENABLED,test "x$enable_lmod" = "xyes" )


#-----------------
# User level tests
#-----------------
Expand Down Expand Up @@ -520,6 +528,7 @@ AC_OUTPUT( Makefile
fs/beegfs/Makefile
fs/lustre/Makefile
dev-tools/easybuild/Makefile
admin/lmod/Makefile
admin/spack/Makefile
dev-tools/mpi4py/Makefile
dev-tools/mpi4py/tests/Makefile
Expand Down Expand Up @@ -606,6 +615,11 @@ if test "x$ROOT_ENABLED" = "x1" ; then
echo ' 'Spack..................... : disabled
fi

if test "x$enable_lmod" = "xyes"; then
echo ' 'Lmod...................... : enabled
else
echo ' 'Lmod...................... : disabled
fi

else

Expand Down

0 comments on commit d3bcaab

Please sign in to comment.