tests: add support for SCL-ized LLVM 13 (llvm-toolset-13.0)

This commit is contained in:
Miloš Prchlík 2021-12-06 09:34:51 +01:00
parent c3456fa4ca
commit 978f4952dd
9 changed files with 87 additions and 36 deletions

View file

@ -1,2 +1,2 @@
summary: Make sure the the LLVM plugin for binutils' ar works
test: ./test.sh
test: "$WITH_SCL ./test.sh"

View file

@ -1,3 +1,3 @@
summary: Make sure rebuilding LLVM still works with the new LLVM
test: ./test.sh
test: "$WITH_SCL ./test.sh"
enabled: false

View file

@ -1,3 +1,15 @@
#
# Build/PR gating tests for *LLVM 13*
#
# Compatible with various LLVM 13 distributions:
#
# * Fedora (ursine packages)
# * Centos 9 stream (ursine packages)
# * RHEL-9 (ursine packages)
# * RHEL-8 (Red Hat module)
# * RHEL-7 (software collection)
#
summary: LLVM tests for build/PR gating
adjust:
- because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR."
@ -6,14 +18,16 @@ adjust:
and trigger != commit
and trigger != build
enabled: false
- because: "When testing SCL-ized LLVM, the collection must be enabled first"
environment+:
WITH_SCL: "scl enable llvm-toolset-13.0 rust-toolset-1.58"
when: "collection == llvm-toolset-13.0"
discover:
how: fmf
execute:
how: tmt
prepare:
- name: packages
how: install
package: llvm
provision:
hardware:
memory: ">= 4 GiB"

View file

@ -1,29 +1,49 @@
summary: Run the upstream LLVM integration test suite
description: |
Run the upstream LLVM integration test suite
test: ./test.sh
test: "$WITH_SCL ./test.sh"
require:
- cmake
- llvm-devel
- clang
- clang-analyzer
- clang-tools-extra
- compiler-rt
- ninja-build
- libomp-devel
- lld
- lldb
- git
- make
- libstdc++-static
- clang-devel
- python3-lit
adjust:
# Common requirements when LLVM is not SCL-ized
- require+:
- cmake
- clang
- clang-analyzer
- clang-devel
- clang-tools-extra
- compiler-rt
- lld
- lldb
- libomp-devel
- llvm-devel
- python3-lit
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require+:
- llvm-toolset-13.0-cmake
- llvm-toolset-13.0-clang
- llvm-toolset-13.0-clang-analyzer
- llvm-toolset-13.0-clang-devel
- llvm-toolset-13.0-clang-tools-extra
- llvm-toolset-13.0-compiler-rt
- llvm-toolset-13.0-lld
- llvm-toolset-13.0-lldb
- llvm-toolset-13.0-libomp-devel
- llvm-toolset-13.0-llvm-devel
- llvm-toolset-13.0-python3-lit
when: "collection == llvm-toolset-13.0"
# libcxx shall be required in Fedora, it's not shipped with RHEL.
- require+:
- libcxx-devel
when: "distro == fedora"
because: testing against libcxx package in Fedora
- environment+:
CMAKE_CXXLIB: "-DENABLE_LIBCXX=OFF"
when: "distro == rhel"

View file

@ -1,2 +1,9 @@
summary: Check that libLLVM.so has been properly stripped
test: ./test.sh
test: "$WITH_SCL ./test.sh"
environment:
LIBLLVM_PATH: /usr/lib64/libLLVM.so
adjust:
- because: "With SCL-ized LLVM, library path is different"
environment+:
LIBLLVM_PATH: /opt/rh/llvm-toolset-13.0/root/usr/lib64/libLLVM.so
when: "collection == llvm-toolset-13.0"

View file

@ -7,4 +7,4 @@
# is less than 100MB to ensure it was successfully stripped.
# https://bugzilla.redhat.com/show_bug.cgi?id=1793250
test $(stat -L -c %s /usr/lib64/libLLVM.so) -lt 104857600
test $(stat -L -c %s $LIBLLVM_PATH) -lt 104857600

View file

@ -1,2 +1,2 @@
summary: Make sure llvm-config symlink is properly set up
test: ./test.sh
test: "$WITH_SCL ./test.sh"

View file

@ -1,16 +1,26 @@
summary: Test basic cargo usage
test: ./test.sh
require:
# Required for rust and possibly other dependant packages
#
# NOTE #1: drop the requirement once the transitional period between releases is gone
# and llvm-compat is no longer a) needed, and b) part of the build.
#
# NOTE #2: keep it the first requirement. Depending on the order of requirements, placing it somewhere
# else in the list may lead to harness uninstalling and re-installing LLVM packages. That a) would be
# a waste of time, b) could potentially hide issues, leading to testing unexpected NVRs.
#
# - llvm-compat
test: "$WITH_SCL ./test.sh"
require: []
adjust:
# Common requirements when LLVM is not SCL-ized
- require+:
# Required for rust and possibly other dependant packages
#
# NOTE #1: drop the requirement once the transitional period between releases is gone
# and llvm-compat is no longer a) needed, and b) part of the build.
#
# NOTE #2: keep it the first requirement. Depending on the order of requirements, placing it somewhere
# else in the list may lead to harness uninstalling and re-installing LLVM packages. That a) would be
# a waste of time, b) could potentially hide issues, leading to testing unexpected NVRs.
#
# - llvm-compat
- cargo
- rust
- cargo
- rust
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require+:
- rust-toolset-1.58-cargo
- rust-toolset-1.58-rust
when: "collection == llvm-toolset-13.0"

View file

@ -1,2 +1,2 @@
summary: Make sure the versioned llvm-config symlink is properly set up
test: ./test.sh
test: "$WITH_SCL ./test.sh"