diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/build-gating-alternatives.fmf b/tests/build-gating-alternatives.fmf new file mode 100644 index 0000000..13054e1 --- /dev/null +++ b/tests/build-gating-alternatives.fmf @@ -0,0 +1,36 @@ +# +# Build/PR gating tests for *LLVM 13* +# +# Imports and runs tests provided by Fedora LLVM git for the matching LLVM version. +# +# NOTE: *always* keep this file in sync with upstream, i.e. Fedora. Since we cannot "discover" a plan, +# we must duplicate at least some part of upstream plan setup, like `adjust` or `provision`. Not necessarily +# all steps, but if we do need some of them here, let's focus on making changes in upstream first, to preserve +# one source of truth. Once TMT learns to include whole plans, we could drop the copied content from here. +# + +summary: LLD tests for build/PR gating, testing alternatives and spoiling the installation +adjust: + - because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR." + when: >- + trigger is defined + 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" + when: "collection == llvm-toolset-13.0" + +discover: + - name: lld-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/lld.git + ref: rawhide + test: ld-alternative +execute: + how: tmt +provision: + hardware: + memory: ">= 4 GiB" diff --git a/tests/build-gating-libomp.fmf b/tests/build-gating-libomp.fmf new file mode 100644 index 0000000..e61824c --- /dev/null +++ b/tests/build-gating-libomp.fmf @@ -0,0 +1,47 @@ +# +# Build/PR gating tests for *LLVM 13* +# +# Imports and runs tests provided by Fedora LLVM git for the matching LLVM version. +# +# NOTE: *always* keep this file in sync with upstream, i.e. Fedora. Since we cannot "discover" a plan, +# we must duplicate at least some part of upstream plan setup, like `adjust` or `provision`. Not necessarily +# all steps, but if we do need some of them here, let's focus on making changes in upstream first, to preserve +# one source of truth. Once TMT learns to include whole plans, we could drop the copied content from here. +# + +summary: libomp 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." + when: >- + trigger is defined + 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" + when: "collection == llvm-toolset-13.0" + + - because: "libomp not supported in s390x" + when: arch == s390x + enabled: false + +discover: + - name: clang-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/clang.git + ref: rawhide + test: libomp +execute: + how: tmt +prepare: + # We want to make sure libomp is not already present on the system to ensure + # that clang pulls in the correct libomp dependencies when it is installed. + - name: Drop libomp + how: shell + script: | + yum erase -y libomp libomp-devel clang clang-libs +provision: + hardware: + memory: ">= 4 GiB" \ No newline at end of file diff --git a/tests/build-gating.fmf b/tests/build-gating.fmf new file mode 100644 index 0000000..b967b21 --- /dev/null +++ b/tests/build-gating.fmf @@ -0,0 +1,76 @@ +# +# Build/PR gating tests for *LLVM 13* +# +# Imports and runs tests provided by Fedora LLVM git for the matching LLVM version. +# + +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." + when: >- + trigger is defined + and trigger != commit + and trigger != build + enabled: false + + # Unfortunately, TMT does not support more declarative approach, we need to run commands on our own. + - because: "On RHEL, CRB must be enabled to provide rarer packages" + prepare+: + - name: Enable CRB + how: shell + script: dnf config-manager --set-enabled rhel-CRB + when: >- + distro == centos + or distro == rhel-9 + or distro == rhel-8 + +discover: + - name: llvm-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/llvm.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: clang-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/clang.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: python-lit-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/python-lit.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: lldb-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/lldb.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: lld-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/lld.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: libomp-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/libomp.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: compiler-rt-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/compiler-rt.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + +execute: + how: tmt + +provision: + hardware: + memory: ">= 4 GiB" \ No newline at end of file