Tests: make openmp-rpm test compatible with RHEL distros and collections
This commit is contained in:
parent
475a496cb9
commit
4de77856dd
@ -1,6 +1,30 @@
|
|||||||
summary: Test build a simple RPM package to ensure that -fopenmp works
|
summary: Test build a simple RPM package to ensure that -fopenmp works
|
||||||
|
test: "$WITH_SCL ./runtest.sh"
|
||||||
require:
|
require:
|
||||||
- dnf
|
|
||||||
- dnf-plugins-core
|
|
||||||
- rpm-build
|
- rpm-build
|
||||||
test: ./runtest.sh
|
adjust:
|
||||||
|
- because: "libomp not supported in s390x"
|
||||||
|
when: arch == s390x
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- because: "Use yum in RHEL < 8"
|
||||||
|
require+:
|
||||||
|
- yum-utils
|
||||||
|
environment+:
|
||||||
|
BUILDDEP_CMD: "yum-builddep"
|
||||||
|
when: distro < rhel-8
|
||||||
|
|
||||||
|
- because: "Use dnf in RHEL >= 8, Fedora and CentOS"
|
||||||
|
require+:
|
||||||
|
- dnf-plugins-core
|
||||||
|
environment+:
|
||||||
|
BUILDDEP_CMD: "dnf builddep"
|
||||||
|
when: distro >= rhel-8 or distro != rhel
|
||||||
|
|
||||||
|
# Requirements for SCL-ized LLVM
|
||||||
|
- require+:
|
||||||
|
- llvm-toolset-13.0-build
|
||||||
|
when: "collection == llvm-toolset-13.0"
|
||||||
|
- require+:
|
||||||
|
- llvm-toolset-14.0-build
|
||||||
|
when: "collection == llvm-toolset-14.0"
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
dnf -y build-dep test.spec
|
${BUILDDEP_CMD} -y test.spec
|
||||||
rpmbuild --define '_sourcedir .' --define '_builddir .' -bb test.spec
|
rpmbuild --define '_sourcedir .' --define '_builddir .' -bb test.spec
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
%global toolchain clang
|
%global toolchain clang
|
||||||
|
%{?scl:%global scl_prefix %{scl}-}
|
||||||
|
|
||||||
Name: test
|
Name: test
|
||||||
Version: 1
|
Version: 1
|
||||||
@ -6,8 +7,8 @@ Release: 1
|
|||||||
Summary: Test package for checking that RPM packages using -fopenmp build correctly
|
Summary: Test package for checking that RPM packages using -fopenmp build correctly
|
||||||
License: MIT
|
License: MIT
|
||||||
|
|
||||||
BuildRequires: clang
|
BuildRequires: %{?scl_prefix}clang
|
||||||
BuildRequires: libomp
|
BuildRequires: %{?scl_prefix}libomp
|
||||||
|
|
||||||
Source0: test.c
|
Source0: test.c
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user