From 6ad9cfeb01dd0a7eef2e40057ce29a2e8074d564 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Wed, 10 Apr 2024 19:33:02 +0200 Subject: [PATCH] Convert integration-test-suite into a virtual test Split tmt metadata into several tests based on the package set to be tested, and select one or another depending on the tmt context. Created subtests for devtools, rhel, fedora and snapshots. --- tests/integration-test-suite/devtools.fmf | 69 ++++++++++++ tests/integration-test-suite/fedora.fmf | 39 +++++++ tests/integration-test-suite/main.fmf | 124 --------------------- tests/integration-test-suite/rhel.fmf | 34 ++++++ tests/integration-test-suite/snapshots.fmf | 27 +++++ 5 files changed, 169 insertions(+), 124 deletions(-) create mode 100644 tests/integration-test-suite/devtools.fmf create mode 100644 tests/integration-test-suite/fedora.fmf create mode 100644 tests/integration-test-suite/rhel.fmf create mode 100644 tests/integration-test-suite/snapshots.fmf diff --git a/tests/integration-test-suite/devtools.fmf b/tests/integration-test-suite/devtools.fmf new file mode 100644 index 0000000..c750c93 --- /dev/null +++ b/tests/integration-test-suite/devtools.fmf @@ -0,0 +1,69 @@ +# DevTools collections settings. + +environment+: + CMAKE_CXXLIB: "-DENABLE_LIBCXX=OFF -DENABLE_STATIC_LIBCXX=OFF" + CMAKE_LIBUNWIND: "-DENABLE_LIBUNWIND=OFF" + +adjust+: + - enabled: false + when: collection is not defined + continue: false + + # 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" + - require+: + - llvm-toolset-14.0-cmake + - llvm-toolset-14.0-clang + - llvm-toolset-14.0-clang-analyzer + - llvm-toolset-14.0-clang-devel + - llvm-toolset-14.0-clang-tools-extra + - llvm-toolset-14.0-compiler-rt + - llvm-toolset-14.0-lld + - llvm-toolset-14.0-lldb + - llvm-toolset-14.0-libomp-devel + - llvm-toolset-14.0-llvm-devel + - llvm-toolset-14.0-python3-lit + when: "collection == llvm-toolset-14.0" + - require+: + - llvm-toolset-15.0-cmake + - llvm-toolset-15.0-clang + - llvm-toolset-15.0-clang-analyzer + - llvm-toolset-15.0-clang-devel + - llvm-toolset-15.0-clang-tools-extra + - llvm-toolset-15.0-compiler-rt + - llvm-toolset-15.0-lld + - llvm-toolset-15.0-lldb + - llvm-toolset-15.0-libomp-devel + - llvm-toolset-15.0-llvm-devel + - llvm-toolset-15.0-python3-lit + when: "collection == llvm-toolset-15.0" + + # lld not supported in s390x or ppc64. If any lld package was added to + # requirements, remove it. + - require-: + - llvm-toolset-13.0-lld + - llvm-toolset-14.0-lld + - llvm-toolset-15.0-lld + when: >- + collection is defined and arch == s390x + or arch == ppc64 + + # libomp not supported in s390x. If any libomp-devel package was added to + # requirements, remove it. + - require-: + - llvm-toolset-13.0-libomp-devel + - llvm-toolset-14.0-libomp-devel + - llvm-toolset-15.0-libomp-devel + when: collection is defined and arch == s390x \ No newline at end of file diff --git a/tests/integration-test-suite/fedora.fmf b/tests/integration-test-suite/fedora.fmf new file mode 100644 index 0000000..c2b5c53 --- /dev/null +++ b/tests/integration-test-suite/fedora.fmf @@ -0,0 +1,39 @@ +# Fedora system repos package testing. +# This setup is meant to be used with packages in system repos, not with +# compat packages, or snapshots. + +require+: + - cmake + - clang + - clang-analyzer + - clang-devel + - clang-tools-extra + - compiler-rt + - lld + - lldb + - libomp-devel + - llvm-devel + - python3-lit + - libcxx-devel + - libcxx-static + - mlir-devel + - llvm-libunwind-devel + +adjust+: + - enabled: false + when: distro != fedora or snapshot is defined + continue: false + + # libomp and lld are supported in s390x for LLVM >= 18. Until tmt provides + # a way to provide custom contexts, we need to filter out by distro versions. + - require-: + - lld + - libomp-devel + when: arch == s390x and distro < fedora-40 + + # libunwind is not built for s390x in LLVM < 17 + - require-: + - llvm-libunwind-devel + environment+: + CMAKE_LIBUNWIND: "-DENABLE_LIBUNWIND=OFF" + when: arch == s390x and distro < fedora-39 \ No newline at end of file diff --git a/tests/integration-test-suite/main.fmf b/tests/integration-test-suite/main.fmf index 24ded15..7ae7d7c 100644 --- a/tests/integration-test-suite/main.fmf +++ b/tests/integration-test-suite/main.fmf @@ -20,129 +20,5 @@ require+: - libstdc++-static # scanbuild_py_makefile needs cc1plus provided by gcc-c++ - gcc-c++ -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" - - require+: - - llvm-toolset-14.0-cmake - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-clang-analyzer - - llvm-toolset-14.0-clang-devel - - llvm-toolset-14.0-clang-tools-extra - - llvm-toolset-14.0-compiler-rt - - llvm-toolset-14.0-lld - - llvm-toolset-14.0-lldb - - llvm-toolset-14.0-libomp-devel - - llvm-toolset-14.0-llvm-devel - - llvm-toolset-14.0-python3-lit - when: "collection == llvm-toolset-14.0" - - require+: - - llvm-toolset-15.0-cmake - - llvm-toolset-15.0-clang - - llvm-toolset-15.0-clang-analyzer - - llvm-toolset-15.0-clang-devel - - llvm-toolset-15.0-clang-tools-extra - - llvm-toolset-15.0-compiler-rt - - llvm-toolset-15.0-lld - - llvm-toolset-15.0-lldb - - llvm-toolset-15.0-libomp-devel - - llvm-toolset-15.0-llvm-devel - - llvm-toolset-15.0-python3-lit - when: "collection == llvm-toolset-15.0" - - # lld not supported in s390x or ppc64. If any lld package was added to - # requirements, remove it. - - require-: - - llvm-toolset-13.0-lld - - llvm-toolset-14.0-lld - - llvm-toolset-15.0-lld - when: >- - collection is defined and arch == s390x - or arch == ppc64 - - # libomp not supported in s390x. If any libomp-devel package was added to - # requirements, remove it. - - require-: - - llvm-toolset-13.0-libomp-devel - - llvm-toolset-14.0-libomp-devel - - llvm-toolset-15.0-libomp-devel - when: collection is defined and arch == s390x - - # libomp and lld are supported in s390x for LLVM >= 18. Until tmt provides - # a way to provide custom contexts, we need to filter out by distro versions. - - require-: - - lld - - libomp-devel - when: arch == s390x and distro < rhel-9, rhel-9.5, fedora-40, centos-stream-9 - - # libcxx shall be required in Fedora, it's not shipped with RHEL. - # Same applies for mlir. - - require+: - - libcxx-devel - - libcxx-static - - mlir-devel - when: "distro == fedora" - because: Require extra packages supported in Fedora - - require+: - - llvm-libunwind-devel - when: "distro == fedora" - - - require-: - - llvm-libunwind-devel - environment+: - CMAKE_LIBUNWIND: "-DENABLE_LIBUNWIND=OFF" - when: distro < fedora-39 and arch == s390x - because: libunwind is not built for s390x in LLVM < 17 - - - environment+: - CMAKE_CXXLIB: "-DENABLE_LIBCXX=OFF -DENABLE_STATIC_LIBCXX=OFF" - CMAKE_LIBUNWIND: "-DENABLE_LIBUNWIND=OFF" - when: >- - distro == centos - or distro == rhel - because: libcxx and libunwind is not shipped with neither Centos nor RHEL - - # llvm-snapshots specific adjustments. - # These are daily builds of a reduced set of the llvm components in currently - # supported Fedora releases. We remove anything that it's not supported. - # Supported components can be checked in: - # https://copr.fedorainfracloud.org/coprs/g/fedora-llvm-team/llvm-snapshots/monitor/ - - require-: - - lldb - - libcxx-devel - - libcxx-static - - mlir-devel - - llvm-libunwind-devel - environment+: - CMAKE_CXXLIB: "-DENABLE_LIBCXX=OFF -DENABLE_STATIC_LIBCXX=OFF" - CMAKE_LIBUNWIND: "-DENABLE_LIBUNWIND=OFF" - when: distro == fedora and snapshot is defined extra-nitrate: TC#0614094 diff --git a/tests/integration-test-suite/rhel.fmf b/tests/integration-test-suite/rhel.fmf new file mode 100644 index 0000000..908e960 --- /dev/null +++ b/tests/integration-test-suite/rhel.fmf @@ -0,0 +1,34 @@ +# RHEL and CentOS settings + +require+: + - cmake + - clang + - clang-analyzer + - clang-devel + - clang-tools-extra + - compiler-rt + - lld + - lldb + - libomp-devel + - llvm-devel + - python3-lit + +environment+: + CMAKE_CXXLIB: "-DENABLE_LIBCXX=OFF -DENABLE_STATIC_LIBCXX=OFF" + CMAKE_LIBUNWIND: "-DENABLE_LIBUNWIND=OFF" + +adjust+: + - enabled: false + when: distro != rhel and distro != centos or collection is defined + continue: false + + # lld is supported in s390x for LLVM >= 18. Until tmt provides + # a way to provide custom contexts, we need to filter out by distro versions. + - require-: + - lld + when: arch == s390x and distro < rhel-9, rhel-9.5, centos-stream-9 + + # libomp is not supported in s390x in RHEL. + - require-: + - libomp-devel + when: arch == s390x \ No newline at end of file diff --git a/tests/integration-test-suite/snapshots.fmf b/tests/integration-test-suite/snapshots.fmf new file mode 100644 index 0000000..53dd22e --- /dev/null +++ b/tests/integration-test-suite/snapshots.fmf @@ -0,0 +1,27 @@ +# llvm-snapshots specific setup. +# These are daily builds (latest upstream sources) of a reduced set of the llvm +# components in currently supported Fedora releases. +# Supported components can be checked in: +# https://copr.fedorainfracloud.org/coprs/g/fedora-llvm-team/llvm-snapshots/monitor/ + +require+: + - cmake + - clang + - clang-analyzer + - clang-devel + - clang-tools-extra + - compiler-rt + - lld + - lldb + - libomp-devel + - llvm-devel + - python3-lit + +environment+: + CMAKE_CXXLIB: "-DENABLE_LIBCXX=OFF -DENABLE_STATIC_LIBCXX=OFF" + CMAKE_LIBUNWIND: "-DENABLE_LIBUNWIND=OFF" + +adjust+: + - enabled: false + when: snapshot is not defined + continue: false \ No newline at end of file