Init repo.
* Init tmt * Add sanity test * Add gating fmf plan
This commit is contained in:
parent
ca6ae8f594
commit
7909f0b729
5 changed files with 84 additions and 0 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
38
build-gating.fmf
Normal file
38
build-gating.fmf
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# Build/PR gating tests for libomp
|
||||
#
|
||||
# Compatible with various LLVM distributions:
|
||||
#
|
||||
# * Fedora (ursine packages)
|
||||
# * Centos 9 stream (ursine packages)
|
||||
# * RHEL-9 (ursine packages)
|
||||
# * RHEL-8 (Red Hat module)
|
||||
# * RHEL-7 (software collection)
|
||||
#
|
||||
|
||||
summary: libomp 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 rust-toolset-1.58"
|
||||
when: "collection == llvm-toolset-13.0"
|
||||
- because: "When testing SCL-ized LLVM, the collection must be enabled first"
|
||||
environment+:
|
||||
WITH_SCL: "scl enable llvm-toolset-14.0 rust-toolset-1.62"
|
||||
when: "collection == llvm-toolset-14.0"
|
||||
|
||||
discover:
|
||||
- name: libomp-tests
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
provision:
|
||||
hardware:
|
||||
memory: ">= 4 GiB"
|
||||
30
sanity/main.fmf
Normal file
30
sanity/main.fmf
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
summary: libomp sanity test
|
||||
test: "$WITH_SCL ./test.sh"
|
||||
framework: shell
|
||||
|
||||
adjust:
|
||||
- because: "libomp is not supported in s390x"
|
||||
when: arch == s390x
|
||||
enabled: false
|
||||
|
||||
# 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"
|
||||
- require:
|
||||
- llvm-toolset-14.0-clang
|
||||
- llvm-toolset-14.0-clang-libs
|
||||
- llvm-toolset-14.0-libomp
|
||||
- llvm-toolset-14.0-libomp-devel
|
||||
when: "collection == llvm-toolset-14.0"
|
||||
8
sanity/openmp-compile-link-test.c
Normal file
8
sanity/openmp-compile-link-test.c
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include <omp.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int nthreads = omp_get_num_threads();
|
||||
printf("Num Threads: %d\n", nthreads);
|
||||
return 0;
|
||||
}
|
||||
7
sanity/test.sh
Executable file
7
sanity/test.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -exo pipefail
|
||||
|
||||
clang -fopenmp openmp-compile-link-test.c
|
||||
|
||||
./a.out | grep "Num Threads: 1"
|
||||
Loading…
Add table
Add a link
Reference in a new issue