From 6983440d8235c3af4a2310d4c5d0acfd1afd6716 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 25 Oct 2022 10:30:37 +0200 Subject: [PATCH] Remove lld-test package Resolves: rhbz#2118319 --- lit.lld-test.cfg.py | 12 --------- lld.spec | 63 ++++--------------------------------------- run-lit-tests | 66 --------------------------------------------- 3 files changed, 5 insertions(+), 136 deletions(-) delete mode 100644 lit.lld-test.cfg.py delete mode 100644 run-lit-tests diff --git a/lit.lld-test.cfg.py b/lit.lld-test.cfg.py deleted file mode 100644 index 10d165b..0000000 --- a/lit.lld-test.cfg.py +++ /dev/null @@ -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) diff --git a/lld.spec b/lld.spec index 6489666..74ff4c1 100644 --- a/lld.spec +++ b/lld.spec @@ -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 - 15.0.1-1 +* Tue Oct 25 2022 Konrad Kleine - 15.0.1-2 +- Remove lld-test package + +* Thu Sep 29 2022 Konrad Kleine - 15.0.1-1 - 15.0.1 Release * Wed Jul 20 2022 Timm Bäder - 14.0.6-1 diff --git a/run-lit-tests b/run-lit-tests deleted file mode 100644 index 1a448d0..0000000 --- a/run-lit-tests +++ /dev/null @@ -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