Copy over gating config from c9s and adjust for RHEL-10

Resolves: RHELMISC-3930
This commit is contained in:
Alexander Todorov 2024-04-19 14:48:01 +03:00 committed by Tomáš Hozza
parent 53de16f0bb
commit dd02361615
No known key found for this signature in database
GPG Key ID: C5887AD51D9F3C2D
6 changed files with 45 additions and 0 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -0,0 +1,8 @@
summary: Run integration tests
prepare:
how: install
package:
- osbuild-composer-tests
execute:
script: ./tests/scripts/run_tests.sh ./tests/
duration: 24h

6
plans/unit-tests.fmf Normal file
View File

@ -0,0 +1,6 @@
summary: Run unit tests from source
discover:
how: fmf
dist-git-source: true
execute:
how: tmt

19
tests/scripts/run_tests.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
set -euxo pipefail
TOPDIR=$1
# Print some information about the machine
df -h
free -h
rpm -qa
find /etc/yum.repos.d -type f -print -exec cat {} \;
# Run only basic smoke tests.
# Our test-suite is currently very thorough and it builds a lot of images.
# On some runs, TFT was able to build one image for 25 minutes. Our test
# suite builds more than 25 images which means that the full test-suite
# can run for more than 10 hours. That's just too slow and since we are also
# able to run downstream tests on our much faster upstream infrastructure.
# I think that it's enough to do just smoke tests here.
/usr/libexec/tests/osbuild-composer/base_tests.sh

5
tests/unit.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Run unit tests
require:
- golang
test: cd ../osbuild-composer-*/ && sudo dnf builddep -y osbuild-composer.spec && GOFLAGS="-mod=vendor -tags=exclude_graphdriver_btrfs" go test ./...
duration: 1h