tests: re-use Fedora tests
Related: rhbz#2001107
This commit is contained in:
parent
a456636437
commit
b8ecaeec40
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
53
tests/build-gating.fmf
Normal file
53
tests/build-gating.fmf
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
#
|
||||||
|
# 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: compiler-rt 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"
|
||||||
|
when: >-
|
||||||
|
distro == rhel-9
|
||||||
|
or distro == rhel-8
|
||||||
|
prepare+:
|
||||||
|
- name: Enable CRB
|
||||||
|
how: shell
|
||||||
|
script: dnf config-manager --set-enabled rhel-CRB
|
||||||
|
|
||||||
|
- because: "On CentOS, CRB must be enabled to provide rarer packages"
|
||||||
|
when: >-
|
||||||
|
distro == centos
|
||||||
|
prepare+:
|
||||||
|
- name: Enable CRB
|
||||||
|
how: shell
|
||||||
|
script: dnf config-manager --set-enabled crb
|
||||||
|
|
||||||
|
discover:
|
||||||
|
- name: compiler-rt-upstream-tests
|
||||||
|
how: fmf
|
||||||
|
url: https://src.fedoraproject.org/rpms/compiler-rt.git
|
||||||
|
ref: rawhide
|
||||||
|
- name: upstream-llvm-integration-testsuite
|
||||||
|
how: fmf
|
||||||
|
url: https://src.fedoraproject.org/rpms/llvm.git
|
||||||
|
ref: rawhide
|
||||||
|
test: integration-test-suite
|
||||||
|
execute:
|
||||||
|
how: tmt
|
||||||
|
provision:
|
||||||
|
hardware:
|
||||||
|
memory: ">= 4 GiB"
|
@ -1,38 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
echo "usage `basename $0` [OPTIONS]"
|
|
||||||
echo " --threads NUM The number of threads to use for running tests."
|
|
||||||
}
|
|
||||||
|
|
||||||
thread_args=""
|
|
||||||
repo_url=https://github.com/opencollab/llvm-toolchain-integration-test-suite
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
--threads)
|
|
||||||
shift
|
|
||||||
threads="$1"
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
echo "unknown option: $1"
|
|
||||||
echo ""
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -n "$threads" ]; then
|
|
||||||
thread_args="-j$threads"
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -xe
|
|
||||||
|
|
||||||
cd $(mktemp -d -p /var/tmp)
|
|
||||||
git clone $repo_url
|
|
||||||
cd llvm-toolchain-integration-test-suite
|
|
||||||
mkdir _build && cd _build
|
|
||||||
cmake .. -GNinja
|
|
||||||
ninja $thread_args check
|
|
@ -1,25 +0,0 @@
|
|||||||
- hosts: localhost
|
|
||||||
roles:
|
|
||||||
- role: standard-test-basic
|
|
||||||
tags:
|
|
||||||
- classic
|
|
||||||
required_packages:
|
|
||||||
# the requirements below are for the integration suite
|
|
||||||
- cmake
|
|
||||||
- llvm-devel
|
|
||||||
- clang
|
|
||||||
- clang-analyzer
|
|
||||||
- clang-tools-extra
|
|
||||||
- compiler-rt
|
|
||||||
- ninja-build
|
|
||||||
- libcxx-devel
|
|
||||||
- libomp-devel
|
|
||||||
- python-lit
|
|
||||||
- lld
|
|
||||||
- lldb
|
|
||||||
- git
|
|
||||||
- make
|
|
||||||
- libstdc++-static
|
|
||||||
- clang-devel
|
|
||||||
tests:
|
|
||||||
- integration-test-suite
|
|
Loading…
Reference in New Issue
Block a user