Skip to content

Commit

Permalink
Add tests for lmod component
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
  • Loading branch information
martin-g committed Oct 17, 2024
1 parent ea0821d commit 8c1fc03
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/dev-tools/scipy/SPECS/python-scipy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Requires: openblas-%{compiler_family}%{PROJ_DELIM}

Name: %{python_prefix}-%{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM}
Version: 1.5.4
Release: 2%{?dist}
Release: 1%{?dist}
Summary: Scientific Tools for Python
License: BSD-3-Clause
Group: %{PROJ_NAME}/dev-tools
Expand Down
2 changes: 2 additions & 0 deletions tests/admin/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ endif
if SLURM_ENABLED
TESTS += slurm-plugins
endif

SUBDIRS += lmod
24 changes: 24 additions & 0 deletions tests/admin/lmod/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2015, Intel Corporation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions tests/admin/lmod/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +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

0 comments on commit 8c1fc03

Please sign in to comment.