Add gating definition for RHEL 9

Related: #1961047
This commit is contained in:
Benjamin Berg 2021-06-10 17:49:14 +02:00
parent bf7460a40f
commit 5d014dfcde
4 changed files with 44 additions and 0 deletions

6
gating.yaml Normal file
View File

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

12
tests/run_tests.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
# fail the whole test set if any of the command pipelines fail
set -ex
# when running this in 1minutetip the PATH must be specified to execute
# in the local directory.
echo "Setting path to local directory"
PATH=$PATH:$(pwd)
# simple version test
version.sh

9
tests/tests.yml Normal file
View File

@ -0,0 +1,9 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: . # switch to subfolder. This parameter is REQUIRED, use `dir: .` for current folder
run: ./run_tests.sh # this is your test command, its exit code is the outcome of the test

17
tests/version.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
#
# Thermald is a systemd unit file that requires specific hardware and
# firmware. As such it is difficult to test in an automated fashion.
# fail the whole test if any of the command pipelines below fails
set -ex
rpmversion=$(rpm -q --queryformat '%{VERSION}' thermald)
version=$(thermald --version)
if [ "$version" != "$rpmversion" ]; then
echo "reported thermald version (${version}) does not match rpm version (${rpmversion})"
exit 1
fi
# if we get here, it's OK