From 07e645466dc8289694235b5224ac5737c58a3a3f Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Thu, 23 Feb 2023 11:47:58 +0000 Subject: [PATCH] update modulemd etc --- README.md | 10 ++++++ gating.yaml | 8 +++++ kernel-testing.yaml | 73 ++++++++++++++++++++++++++++++++++++++++ llvm-toolset.yaml | 69 ++++++++++++++++++++++++++++++++++++++ tests/build-gating.fmf | 75 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 235 insertions(+) create mode 100644 README.md create mode 100644 gating.yaml create mode 100644 kernel-testing.yaml create mode 100644 llvm-toolset.yaml create mode 100644 tests/build-gating.fmf diff --git a/README.md b/README.md new file mode 100644 index 0000000..a55e0d8 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Testing + +Each time before we build this module, we need to do a test build of the +kernel in order to check that the changes we are making won't break +the kernel build. This can be can be done using the kernel-testing.yaml +modulemd file: + + rhpkg module-scratch-build --file kernel-testing.yaml -w + + diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..5a2bd91 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,8 @@ +--- !Policy +product_versions: + - rhel-8 +decision_context: osci_compose_gate_modules +subject_type: redhat-module +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.redhat-module.other.functional} + - !PassingTestCaseRule {test_case_name: osci.redhat-module.rebuild.validation} \ No newline at end of file diff --git a/kernel-testing.yaml b/kernel-testing.yaml new file mode 100644 index 0000000..e399c44 --- /dev/null +++ b/kernel-testing.yaml @@ -0,0 +1,73 @@ +document: modulemd +version: 2 +data: + name: llvm-toolset + stream: rhel8 + summary: LLVM + description: LLVM Tools and libraries + license: + module: [MIT] + dependencies: + - buildrequires: + platform: [el8] + requires: + platform: [el8] + profiles: + common: + rpms: + - llvm-toolset + api: + rpms: + - clang + - clang-analyzer + - clang-libs + - clang-devel + - clang-tools-extra + - git-clang-format + - lldb + - lldb-devel + - llvm + - llvm-devel + - llvm-libs + - lld + - lld-libs + components: + rpms: + python-lit: + rationale: Lit test runner for LLVM + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 0 + llvm: + rationale: LLVM tools and libraries + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 0 + compiler-rt: + rationale: LLVM compiler intrinsic and sanitizer libraries + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 1 + lld: + rationale: LLVM linker + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 1 + clang: + rationale: clang tools and libraries + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 1 + libomp: + rationale: LLVM OpenMP runtime + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 2 + lldb: + rationale: lldb debugger + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 2 + kernel: + ref: rhel-8.8.0 + buildorder: 3 + buildonly: true diff --git a/llvm-toolset.yaml b/llvm-toolset.yaml new file mode 100644 index 0000000..0e98a3f --- /dev/null +++ b/llvm-toolset.yaml @@ -0,0 +1,69 @@ +document: modulemd +version: 2 +data: + name: llvm-toolset + stream: rhel8 + summary: LLVM + description: LLVM Tools and libraries + license: + module: [MIT] + dependencies: + - buildrequires: + platform: [el8] + requires: + platform: [el8] + profiles: + common: + rpms: + - llvm-toolset + api: + rpms: + - clang + - clang-analyzer + - clang-libs + - clang-devel + - clang-tools-extra + - git-clang-format + - lldb + - lldb-devel + - llvm + - llvm-devel + - llvm-libs + - lld + - lld-libs + components: + rpms: + python-lit: + rationale: Lit test runner for LLVM + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 0 + llvm: + rationale: LLVM tools and libraries + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 0 + compiler-rt: + rationale: LLVM compiler intrinsic and sanitizer libraries + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 1 + lld: + rationale: LLVM linker + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 1 + clang: + rationale: clang tools and libraries + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 1 + libomp: + rationale: LLVM OpenMP runtime + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 2 + lldb: + rationale: lldb debugger + multilib: [x86_64] + ref: stream-rhel-8-rhel-8.8.0 + buildorder: 2 diff --git a/tests/build-gating.fmf b/tests/build-gating.fmf new file mode 100644 index 0000000..163a16d --- /dev/null +++ b/tests/build-gating.fmf @@ -0,0 +1,75 @@ +# +# 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 *-CRB + when: >- + distro == rhel-9 + or distro == rhel-8 + +discover: + - name: llvm-upstream + how: fmf + url: https://src.fedoraproject.org/tests/llvm.git + ref: main + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: clang-upstream + how: fmf + url: https://src.fedoraproject.org/tests/clang.git + ref: main + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: python-lit-upstream + how: fmf + url: https://src.fedoraproject.org/tests/python-lit.git + ref: main + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: lldb-upstream + how: fmf + url: https://src.fedoraproject.org/tests/lldb.git + ref: main + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: lld-upstream + how: fmf + url: https://src.fedoraproject.org/tests/lld.git + ref: main + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: libomp-upstream + how: fmf + url: https://src.fedoraproject.org/tests/libomp.git + ref: main + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: compiler-rt-upstream + how: fmf + url: https://src.fedoraproject.org/tests/compiler-rt.git + ref: main + filter: "tag:-spoils-installation & tag:-not-in-default" + +execute: + how: tmt + +provision: + hardware: + memory: ">= 4 GiB" \ No newline at end of file