diff --git a/tests/build-gating.fmf b/tests/build-gating.fmf index 4ae3f50..573a4e5 100644 --- a/tests/build-gating.fmf +++ b/tests/build-gating.fmf @@ -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 adjust: - 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 != 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: - name: Local tests how: fmf @@ -17,10 +35,6 @@ discover: test: integration-test-suite execute: how: tmt -prepare: - - name: packages - how: install - package: clang provision: hardware: memory: ">= 4 GiB" diff --git a/tests/clang-format-diff/main.fmf b/tests/clang-format-diff/main.fmf index 8eadb00..16bcfcc 100644 --- a/tests/clang-format-diff/main.fmf +++ b/tests/clang-format-diff/main.fmf @@ -1,4 +1,12 @@ summary: clang-format-diff -test: ./test.sh -require: - - clang-tools-extra +test: "$WITH_SCL ./test.sh" +adjust: + # 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" diff --git a/tests/fedora-flags/main.fmf b/tests/fedora-flags/main.fmf index 118336e..0c54189 100644 --- a/tests/fedora-flags/main.fmf +++ b/tests/fedora-flags/main.fmf @@ -1,5 +1,5 @@ summary: fedora-flags -test: ./test.sh +test: "$WITH_SCL ./test.sh" require: - annobin - redhat-rpm-config diff --git a/tests/libomp/main.fmf b/tests/libomp/main.fmf index a2c9403..536527c 100644 --- a/tests/libomp/main.fmf +++ b/tests/libomp/main.fmf @@ -7,7 +7,20 @@ summary: libomp tests # it shouldn't be part of the `/tests/default` plan. tag: - not-in-default -test: ./test.sh -require: - - clang - - libomp +test: "$WITH_SCL ./test.sh" +adjust: + # Common requirements when LLVM is not SCL-ized + - 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" diff --git a/tests/llvm-test-suite/main.fmf b/tests/llvm-test-suite/main.fmf index 9515577..b805467 100644 --- a/tests/llvm-test-suite/main.fmf +++ b/tests/llvm-test-suite/main.fmf @@ -6,7 +6,8 @@ adjust: when: "distro == rhel" enabled: false -test: ./test.sh +test: "$WITH_SCL ./test.sh" + require: - git - clang diff --git a/tests/llvm-toolchain/main.fmf b/tests/llvm-toolchain/main.fmf index 96d4d56..5923b64 100644 --- a/tests/llvm-toolchain/main.fmf +++ b/tests/llvm-toolchain/main.fmf @@ -1,30 +1,36 @@ # TODO REVIEW: better summary summary: "" -test: ./test.sh +test: "$WITH_SCL ./test.sh" +require: + - glibc-devel + - glibc-static + - gcc adjust: - - environment+: - CXXLIB: "libc++" - require: + # Common requirements when LLVM is not SCL-ized + - require+: - clang - lld - 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-static - - glibc-devel - - glibc-static - - gcc when: "distro == fedora" because: testing against libcxx package in Fedora + - environment+: CXXLIB: "libstdc++" require: - - clang - - lld - - compiler-rt - - glibc-devel - - glibc-static - - gcc - libstdc++ when: "distro == rhel" because: testing against libstdc++ package in RHEL as libcxx is not shipped with RHEL -require: [] diff --git a/tests/pocl/main.fmf b/tests/pocl/main.fmf index c1395dc..8ed6cf7 100644 --- a/tests/pocl/main.fmf +++ b/tests/pocl/main.fmf @@ -14,7 +14,7 @@ adjust: tag: - not-in-default # rhbz#1582884 -test: ./test.sh +test: "$WITH_SCL ./test.sh" require: - git - ocl-icd-devel diff --git a/tests/rhbz_1647130/main.fmf b/tests/rhbz_1647130/main.fmf index 40c4aa1..fef12e3 100644 --- a/tests/rhbz_1647130/main.fmf +++ b/tests/rhbz_1647130/main.fmf @@ -1,4 +1,13 @@ summary: RHBZ1647130 -test: ./test.sh -require: - - clang +test: "$WITH_SCL ./test.sh" +require: [] +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" diff --git a/tests/rhbz_1657544/main.fmf b/tests/rhbz_1657544/main.fmf index 223c5f5..3e7b320 100644 --- a/tests/rhbz_1657544/main.fmf +++ b/tests/rhbz_1657544/main.fmf @@ -1,4 +1,13 @@ summary: RHBZ1657544 -test: ./test.sh -require: - - clang +test: "$WITH_SCL ./test.sh" +require: [] +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" diff --git a/tests/rhbz_482491/main.fmf b/tests/rhbz_482491/main.fmf index cac70ae..a2f8800 100644 --- a/tests/rhbz_482491/main.fmf +++ b/tests/rhbz_482491/main.fmf @@ -1,5 +1,14 @@ summary: rhbz-482491 -test: ./test.sh +test: "$WITH_SCL ./test.sh" require: - - clang - 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" diff --git a/tests/toolchains/main.fmf b/tests/toolchains/main.fmf index 7a3b0f4..b8cf748 100644 --- a/tests/toolchains/main.fmf +++ b/tests/toolchains/main.fmf @@ -1,21 +1,31 @@ # TODO REVIEW: better summary summary: "" -test: ./test.sh +test: "$WITH_SCL ./test.sh" 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+: CXXLIBS: "libc++" require: - - clang - libcxx-devel when: "distro == fedora" because: testing against libcxx package in Fedora + - environment+: CXXLIBS: "libstdc++" require: - - clang - libstdc++ when: "distro == 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 # need more packages from LLVM family. require: []