Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
Signed-off-by: jcsiadal <[email protected]>
  • Loading branch information
jcsiadal committed Mar 29, 2023
1 parent 9603f15 commit 4f03227
Show file tree
Hide file tree
Showing 51 changed files with 68 additions and 13,854 deletions.
42 changes: 23 additions & 19 deletions components/admin/test-suite/SPECS/tests.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,73 +8,77 @@
#
#----------------------------------------------------------------------------eh-

%global __brp_mangle_shebangs_exclude bats
%undefine __brp_mangle_shebangs

%include %{_sourcedir}/OHPC_macros

%define testuser ohpc-test
%define homedir %(sed -n "s/^\s*HOME=\s*//p" /etc/default/useradd || echo "/home" )

Summary: Integration test suite for OpenHPC
Name: test-suite%{PROJ_DELIM}
Version: 2.6.0
Version: 3.0
Release: 1
License: Apache-2.0
Group: %{PROJ_NAME}/admin
BuildArch: noarch
URL: https://github.com/openhpc/ohpc/tests
Source0: tests-ohpc.tar
# In the OHPC source root dir, create with "tar -cf tests-ohpc.tar tests/"

BuildRequires: autoconf%{PROJ_DELIM}
BuildRequires: automake%{PROJ_DELIM}
BuildRequires: sed, findutils

%global __brp_mangle_shebangs_exclude bats
%undefine __brp_mangle_shebangs

%if 0%{?suse_version}
%if 0%{?suse_version} || 0%{?sle_version}
Requires(pre): shadow
Requires: python-base
Requires: python3-base
%endif

%if 0%{?rhel_version}
Requires(pre): shadow-utils
Requires: python2
Requires: python3
%endif

%define testuser ohpc-test

%description

This package provides a suite of integration tests used by the OpenHPC project
during continuous integration. Most components can be tested individually, but
a default configuration is setup to enable collective testing. The test suite
is made available under an '%{testuser}' user account.


%prep
%setup -n tests-ohpc
find . -name .gitignore -exec rm {} \;

%build

%build
export PATH=/opt/ohpc/pub/utils/autotools/bin:$PATH
cd tests
./bootstrap


%install
mkdir -p %{buildroot}%{homedir}/%{testuser}
cp -a tests %{buildroot}%{homedir}/%{testuser}/

cd tests
%{__mkdir_p} %{buildroot}/home/%{testuser}/tests
cp -a * %{buildroot}/home/%{testuser}/tests
find %{buildroot}/home/%{testuser}/tests -name .gitignore -exec rm {} \;

%pre
getent passwd %{testuser} >/dev/null || \
/usr/sbin/useradd -U -c "OpenHPC integration test account" \
-s /bin/bash -m -b /home %{testuser}
-s /bin/bash -m -b %{homedir} %{testuser}
%if 0%{?suse_version}
if [ $(getent group singularity) ]; then
usermod -a -G singularity ohpc-test
fi
%endif
exit 0
if [ $(getent group geopm) ]; then
usermod -a -G geopm ohpc-test
fi


%files
%defattr(-,%{testuser},%{testuser},-)
%dir /home/%{testuser}
/home/%{testuser}/tests

%{homedir}/%{testuser}/tests
1 change: 0 additions & 1 deletion tests/admin/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ TESTS_ENVIRONMENT = BATS_NO_SUMMARY=1

TESTS = init.sh

TESTS += clustershell
TESTS += conman
TESTS += genders
TESTS += nhc
Expand Down
134 changes: 0 additions & 134 deletions tests/admin/clush-tests/CLIClubakTest.py

This file was deleted.

Loading

0 comments on commit 4f03227

Please sign in to comment.