From fc96a3949369d4d9c736eb8deb5eb9d0bb19e1d7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 16 Oct 2023 09:00:39 +0200 Subject: [PATCH] Remove libomp-test package This was an internal testing package that is no longer used. The main libomp packages will obsolete the libomp-test package. Resolves: RHEL-9028 --- libomp.spec | 62 ++-------------------------------------------- lit.fedora.cfg.py | 15 ----------- run-lit-tests | 63 ----------------------------------------------- 3 files changed, 2 insertions(+), 138 deletions(-) delete mode 100644 lit.fedora.cfg.py delete mode 100644 run-lit-tests diff --git a/libomp.spec b/libomp.spec index 7266324..017a6de 100644 --- a/libomp.spec +++ b/libomp.spec @@ -28,12 +28,6 @@ %global libomp_arch %{_arch} %endif -%ifarch %{ix86} -%bcond_with testpkg -%else -%bcond_without testpkg -%endif - Name: libomp Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}} Release: 1%{?dist} @@ -49,8 +43,6 @@ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{libomp_srcdir}.tar.xz.sig Source2: release-keys.asc %endif -Source3: run-lit-tests -Source4: lit.fedora.cfg.py BuildRequires: clang >= %{maj_ver} # For clang-offload-packager @@ -74,6 +66,8 @@ BuildRequires: llvm-cmake-utils Requires: elfutils-libelf%{?isa} +Obsoletes: libomp-test < 17.0.3 + # libomp does not support s390x. ExcludeArch: s390x @@ -88,23 +82,6 @@ Requires: clang-resource-filesystem%{?isa} = %{version} %description devel OpenMP header files. -%if %{with testpkg} - -%package test -Summary: OpenMP regression tests -Requires: %{name}%{?isa} = %{version}-%{release} -Requires: %{name}-devel%{?isa} = %{version}-%{release} -Requires: clang -Requires: llvm -Requires: gcc -Requires: gcc-c++ -Requires: python3-lit - -%description test -OpenMP regression tests - -%endif - %prep %if %{without snapshot_build} %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' @@ -139,35 +116,6 @@ OpenMP regression tests %install %cmake_install -%if %{with testpkg} -# Test package setup -%global libomp_srcdir %{_datadir}/libomp/src/ -%global libomp_testdir %{libomp_srcdir}/runtime/test/ -%global lit_cfg %{libomp_testdir}/%{_arch}.site.cfg.py -%global lit_fedora_cfg %{_datadir}/libomp/lit.fedora.cfg.py - -# Install test files -install -d %{buildroot}%{libomp_srcdir}/runtime -cp -R runtime/test %{buildroot}%{libomp_srcdir}/runtime -cp -R runtime/src %{buildroot}%{libomp_srcdir}/runtime - -# Generate lit config files. Strip off the last line that initiates the -# test run, so we can customize the configuration. -head -n -1 %{_vpath_builddir}/runtime/test/lit.site.cfg >> %{buildroot}%{lit_cfg} - -# Install custom fedora config file -cp %{SOURCE4} %{buildroot}%{lit_fedora_cfg} - -# Patch lit config files to load custom fedora config -echo "lit_config.load_config(config, '%{lit_fedora_cfg}')" >> %{buildroot}%{lit_cfg} - -# Install test script -install -d %{buildroot}%{_libexecdir}/tests/libomp -install -m 0755 %{SOURCE3} %{buildroot}%{_libexecdir}/tests/libomp - - -%endif - # Remove static libraries with equivalent shared libraries rm -rf %{buildroot}%{_libdir}/libarcher_static.a @@ -208,12 +156,6 @@ rm -rf %{buildroot}%{_libdir}/libarcher_static.a %{_libdir}/libomptarget.so %endif -%if %{with testpkg} -%files test -%{_datadir}/libomp -%{_libexecdir}/tests/libomp/ -%endif - %changelog * Wed Oct 04 2023 Nikita Popov - 17.0.2-1 - Update to LLVM 17.0.2 diff --git a/lit.fedora.cfg.py b/lit.fedora.cfg.py deleted file mode 100644 index fe0fa89..0000000 --- a/lit.fedora.cfg.py +++ /dev/null @@ -1,15 +0,0 @@ -import tempfile - -compiler = '%(libomp_compiler)s' % lit_config.params -config.test_filecheck = '%(bindir)s/FileCheck' % lit_config.params -config.omp_header_directory = '%(includedir)s' % lit_config.params -config.libomp_obj_root = tempfile.mkdtemp() -config.library_dir = '%(libdir)s' % lit_config.params -test_root = '%(libomp_test_root)s' % lit_config.params - -# Lit will default to the compiler used to build openmp, which is gcc, but we -# want to run the tests using clang. -config.test_compiler_features = ['clang', 'clang-11'] -config.test_c_compiler = 'clang' -config.test_cxx_compiler = 'clang++' -lit_config.load_config(config, '%(libomp_test_root)s/lit.cfg' % lit_config.params) diff --git a/run-lit-tests b/run-lit-tests deleted file mode 100644 index f7e908e..0000000 --- a/run-lit-tests +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/bash - -set -e - -usage() { - echo "usage: `basename $0` [OPTIONS]" - echo " --threads NUM The number of threads to use for running tests." -} - - -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 - - -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 - -BIN_DIR="/usr/bin/" -INCLUDE_DIR="/usr/include/" - -lit $threads_arg -v \ - --config-prefix $ARCH \ - -Dlibomp_compiler=clang \ - -Dbindir=$BIN_DIR \ - -Dlibdir=$LIB_DIR \ - -Dincludedir=$INCLUDE_DIR \ - -Dlibomp_test_root=/usr/share/libomp/src/runtime/test \ - /usr/share/libomp/src/runtime/test - -exit 0