Remove lld-test package

Resolves: rhbz#2118319
This commit is contained in:
Konrad Kleine 2022-10-25 10:30:37 +02:00
parent 93818d983b
commit 6983440d82
3 changed files with 5 additions and 136 deletions

View File

@ -1,12 +0,0 @@
#Clear lld_tools_dir so we don't accidently pick up tools from somewhere else
config.lld_tools_dir = ""
if hasattr(config, 'have_zlib'):
# Regression tests write output to this directory, so we need to be able to specify
# a temp directory when invoking lit. e.g. lit -Dlld_obj_root=/tmp/lit
config.lld_obj_root = "%(lld_obj_root)s" % lit_config.params
lit_config.load_config(config, '%(lld_test_root)s/lit.cfg.py' % lit_config.params)
else:
# For unit tests, llvm_obj_root is used to find the unit test binaries.
config.lld_obj_root = '%(lld_unittest_bindir)s' % lit_config.params
lit_config.load_config(config, '%(lld_test_root)s/Unit/lit.cfg.py' % lit_config.params)

View File

@ -12,13 +12,9 @@
%global install_includedir %{_includedir}
%global install_libdir %{_libdir}
# Don't include unittests in automatic generation of provides or requires.
%global __provides_exclude_from ^%{install_libdir}/lld/.*$
%global __requires_exclude ^libgtest.*$
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist}
Release: 2%{?dist}
Summary: The LLVM Linker
License: NCSA
@ -26,8 +22,6 @@ URL: http://llvm.org
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz.sig
Source2: release-keys.asc
Source3: run-lit-tests
Source4: lit.lld-test.cfg.py
ExcludeArch: s390x
@ -78,16 +72,6 @@ Summary: LLD shared libraries
%description libs
Shared libraries for LLD.
%package test
Summary: LLD regression tests
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-lit
Requires: llvm-test(major) = %{maj_ver}
Requires: lld-libs = %{version}-%{release}
%description test
LLVM regression tests.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -n %{lld_srcdir} -p2
@ -119,39 +103,8 @@ LLVM regression tests.
%cmake_build
# Build the unittests so we can install them.
%cmake_build --target lld-test-depends
%install
%global lit_cfg test/%{_arch}.site.cfg.py
%global lit_lld_test_cfg_install_path %{_datadir}/lld/lit.lld-test.cfg.py
# Generate lit config files. Strip off the last line that initiates the
# test run, so we can customize the configuration.
head -n -1 %{__cmake_builddir}/test/lit.site.cfg.py >> %{lit_cfg}
# Patch lit config file to load custom config:
echo "lit_config.load_config(config, '%{lit_lld_test_cfg_install_path}')" >> %{lit_cfg}
# Install test files
install -d %{buildroot}%{_datadir}/lld/src
cp %{SOURCE4} %{buildroot}%{_datadir}/lld/
# The various tar options are there to make sur the archive is the same on 32 and 64 bit arch, i.e.
# the archive creation is reproducible. Move arch-specific content out of the tarball
mv %{lit_cfg} %{buildroot}%{_datadir}/lld/src/%{_arch}.site.cfg.py
tar --sort=name --mtime='UTC 2020-01-01' -c test/ | gzip -n > %{buildroot}%{_datadir}/lld/src/test.tar.gz
install -d %{buildroot}%{_libexecdir}/tests/lld
install -m 0755 %{SOURCE3} %{buildroot}%{_libexecdir}/tests/lld
# Install unit test binaries
install -d %{buildroot}%{install_libdir}/lld/
rm -rf $(find %{buildroot}%{install_libdir}/lld/ -iname '*make*')
# Install libraries and binaries
%cmake_install
@ -172,12 +125,9 @@ fi
%check
# armv7lhl tests disabled because of arm issue, see https://koji.fedoraproject.org/koji/taskinfo?taskID=33660162
%ifnarch %{arm}
%if %{with check}
%cmake_build --target check-lld
%endif
%endif
%ldconfig_scriptlets libs
@ -197,15 +147,12 @@ fi
%files libs
%{install_libdir}/liblld*.so.*
%files test
%{_libexecdir}/tests/lld/
%{install_libdir}/lld/
%{_datadir}/lld/src/test.tar.gz
%{_datadir}/lld/src/%{_arch}.site.cfg.py
%{_datadir}/lld/lit.lld-test.cfg.py
%changelog
* Thu Sep 29 2022 Konra Kleine <kkleine@redhat.com> - 15.0.1-1
* Tue Oct 25 2022 Konrad Kleine <kkleine@redhat.com> - 15.0.1-2
- Remove lld-test package
* Thu Sep 29 2022 Konrad Kleine <kkleine@redhat.com> - 15.0.1-1
- 15.0.1 Release
* Wed Jul 20 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.6-1

View File

@ -1,66 +0,0 @@
#!/bin/bash
usage() {
cat << EOF
usage: `basename $0` [OPTIONS]
--threads NUM The number of threads to use for running tests.
--multilib-arch ARCH Use this option to test 32-bit libs/binaries on
64-bit hosts.
EOF
}
threads_arg=''
while [ $# -gt 0 ]; do
case $1 in
--threads)
shift
threads_arg="--threads $1"
;;
--multilib-arch)
shift
ARCH=$1
;;
* )
echo "unknown option: $1"
echo ""
usage
exit 1
;;
esac
shift
done
if [ `whoami` = "root" ]; then
echo "error: lld tests do not support running as root."
exit 1
fi
set -xe
if [ -z "$ARCH" ]; then
ARCH=`rpm --eval '%_arch'`
fi
case $ARCH in
arm)
;&
i686)
LIB_DIR="/usr/lib/"
;;
*)
LIB_DIR="/usr/lib64/"
;;
esac
cd $(mktemp -d -p /var/tmp)
ln -s /usr/include include
tar -xzf /usr/share/lld/src/test.tar.gz
ln -s /usr/share/lld/src/$ARCH.site.cfg.py test/lit.site.cfg.py
ln -s /usr/share/lld/src/$ARCH.Unit.site.cfg.py test/Unit/lit.site.cfg.py
LD_LIBRARY_PATH=$LIB_DIR/lld:$LD_LIBRARY_PATH \
lit -v -s $threads_arg test \
-Dlld_obj_root=`pwd` \
-Dlld_test_root=`pwd`/test \
-Dlld_unittest_bindir=$LIB_DIR/lld