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

This commit is contained in:
Miloš Prchlík 2021-12-13 13:37:36 +01:00
parent 68259514b8
commit 23fb27dabb
11 changed files with 118 additions and 39 deletions

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: Clang tests for build/PR gating summary: Clang tests for build/PR gating
adjust: adjust:
- because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR." - because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR."
@ -6,6 +18,12 @@ adjust:
and trigger != commit and trigger != commit
and trigger != build and trigger != build
enabled: false 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: discover:
- name: Local tests - name: Local tests
how: fmf how: fmf
@ -17,10 +35,6 @@ discover:
test: integration-test-suite test: integration-test-suite
execute: execute:
how: tmt how: tmt
prepare:
- name: packages
how: install
package: clang
provision: provision:
hardware: hardware:
memory: ">= 4 GiB" memory: ">= 4 GiB"

View File

@ -1,4 +1,12 @@
summary: clang-format-diff summary: clang-format-diff
test: ./test.sh test: "$WITH_SCL ./test.sh"
require: adjust:
- clang-tools-extra # Common requirements when LLVM is not SCL-ized
- require:
- clang-tools-extra
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require:
- llvm-toolset-13.0-clang-tools-extra
when: "collection == llvm-toolset-13.0"

View File

@ -1,5 +1,5 @@
summary: fedora-flags summary: fedora-flags
test: ./test.sh test: "$WITH_SCL ./test.sh"
require: require:
- annobin - annobin
- redhat-rpm-config - redhat-rpm-config

View File

@ -7,7 +7,20 @@ summary: libomp tests
# it shouldn't be part of the `/tests/default` plan. # it shouldn't be part of the `/tests/default` plan.
tag: tag:
- not-in-default - not-in-default
test: ./test.sh test: "$WITH_SCL ./test.sh"
require: adjust:
- clang # Common requirements when LLVM is not SCL-ized
- libomp - require:
- clang
- clang-libs
- libomp
- libomp-devel
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require:
- llvm-toolset-13.0-clang
- llvm-toolset-13.0-clang-libs
- llvm-toolset-13.0-libomp
- llvm-toolset-13.0-libomp-devel
when: "collection == llvm-toolset-13.0"

View File

@ -6,7 +6,8 @@ adjust:
when: "distro == rhel" when: "distro == rhel"
enabled: false enabled: false
test: ./test.sh test: "$WITH_SCL ./test.sh"
require: require:
- git - git
- clang - clang

View File

@ -1,30 +1,36 @@
# TODO REVIEW: better summary # TODO REVIEW: better summary
summary: "" summary: ""
test: ./test.sh test: "$WITH_SCL ./test.sh"
require:
- glibc-devel
- glibc-static
- gcc
adjust: adjust:
- environment+: # Common requirements when LLVM is not SCL-ized
CXXLIB: "libc++" - require+:
require:
- clang - clang
- lld - lld
- compiler-rt - compiler-rt
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require+:
- llvm-toolset-13.0-clang
- llvm-toolset-13.0-lld
- llvm-toolset-13.0-compiler-rt
when: "collection == llvm-toolset-13.0"
- environment+:
CXXLIB: "libc++"
require+:
- libcxx-devel - libcxx-devel
- libcxx-static - libcxx-static
- glibc-devel
- glibc-static
- gcc
when: "distro == fedora" when: "distro == fedora"
because: testing against libcxx package in Fedora because: testing against libcxx package in Fedora
- environment+: - environment+:
CXXLIB: "libstdc++" CXXLIB: "libstdc++"
require: require:
- clang
- lld
- compiler-rt
- glibc-devel
- glibc-static
- gcc
- libstdc++ - libstdc++
when: "distro == rhel" when: "distro == rhel"
because: testing against libstdc++ package in RHEL as libcxx is not shipped with RHEL because: testing against libstdc++ package in RHEL as libcxx is not shipped with RHEL
require: []

View File

@ -14,7 +14,7 @@ adjust:
tag: tag:
- not-in-default - not-in-default
# rhbz#1582884 # rhbz#1582884
test: ./test.sh test: "$WITH_SCL ./test.sh"
require: require:
- git - git
- ocl-icd-devel - ocl-icd-devel

View File

@ -1,4 +1,13 @@
summary: RHBZ1647130 summary: RHBZ1647130
test: ./test.sh test: "$WITH_SCL ./test.sh"
require: require: []
- clang adjust:
# Common requirements when LLVM is not SCL-ized
- require+:
- clang
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require+:
- llvm-toolset-13.0-clang
when: "collection == llvm-toolset-13.0"

View File

@ -1,4 +1,13 @@
summary: RHBZ1657544 summary: RHBZ1657544
test: ./test.sh test: "$WITH_SCL ./test.sh"
require: require: []
- clang adjust:
# Common requirements when LLVM is not SCL-ized
- require+:
- clang
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require+:
- llvm-toolset-13.0-clang
when: "collection == llvm-toolset-13.0"

View File

@ -1,5 +1,14 @@
summary: rhbz-482491 summary: rhbz-482491
test: ./test.sh test: "$WITH_SCL ./test.sh"
require: require:
- clang
- libgcc - libgcc
adjust:
# Common requirements when LLVM is not SCL-ized
- require+:
- clang
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require+:
- llvm-toolset-13.0-clang
when: "collection == llvm-toolset-13.0"

View File

@ -1,21 +1,31 @@
# TODO REVIEW: better summary # TODO REVIEW: better summary
summary: "" summary: ""
test: ./test.sh test: "$WITH_SCL ./test.sh"
adjust: adjust:
# Common requirements when LLVM is not SCL-ized
- require+:
- clang
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require+:
- llvm-toolset-13.0-clang
when: "collection == llvm-toolset-13.0"
- environment+: - environment+:
CXXLIBS: "libc++" CXXLIBS: "libc++"
require: require:
- clang
- libcxx-devel - libcxx-devel
when: "distro == fedora" when: "distro == fedora"
because: testing against libcxx package in Fedora because: testing against libcxx package in Fedora
- environment+: - environment+:
CXXLIBS: "libstdc++" CXXLIBS: "libstdc++"
require: require:
- clang
- libstdc++ - libstdc++
when: "distro == rhel" when: "distro == rhel"
because: testing against libstdc++ package in RHEL as libcxx is not shipped with RHEL because: testing against libstdc++ package in RHEL as libcxx is not shipped with RHEL
# TODO REVIEW: are these all requirements? test.sh seems to run quite a lot of stuff, looks like we # TODO REVIEW: are these all requirements? test.sh seems to run quite a lot of stuff, looks like we
# need more packages from LLVM family. # need more packages from LLVM family.
require: [] require: []