TMT: use prepare conditionals instead of adjust

Resolves: RHEL-80817

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2025-04-01 15:53:26 +05:30
parent da854f5de9
commit b08be34262
No known key found for this signature in database
GPG Key ID: 1C1EDD7CC7C3A0DD
4 changed files with 15 additions and 49 deletions

View File

@ -2,39 +2,15 @@ discover:
how: fmf
execute:
how: tmt
adjust:
- when: initiator == packit
because: "We need to test with updated packages from rhcontainerbot/podman-next copr"
prepare+:
how: shell
script: |
sed -i -n '/^priority=/!p;$apriority=1' /etc/yum.repos.d/*podman-next*.repo
dnf -y upgrade --allowerasing
# FIXME: Use epel10 once bats is available there
- when: distro == centos-stream-10 or distro == rhel-10
because: "bats isn't yet available on epel10"
prepare+:
how: install
copr: rhcontainerbot/bats-el10
package: bats
- when: distro == centos-stream-9 or distro == rhel-9
because: "bats is present on EPEL on rhel9 / c9s"
prepare+:
how: feature
epel: enabled
/upstream:
summary: Run crun specific Podman system tests on upstream PRs
discover+:
filter: tag:upstream
adjust+:
- enabled: false
when: initiator is not defined or initiator != packit
/downstream:
summary: Run crun specific Podman system tests on bodhi / errata and dist-git PRs
discover+:
filter: tag:downstream
adjust+:
- enabled: false
when: initiator == packit
prepare:
- how: shell
script: |
BATS_VERSION=1.11.1
curl -L https://github.com/bats-core/bats-core/archive/refs/tags/v$BATS_VERSION.tar.gz | tar zx
cd bats-core-$BATS_VERSION
./install.sh /usr
- how: install
package:
- conmon
- crun
- podman-tests

View File

@ -1,15 +1,7 @@
require:
- bats
- conmon
- crun
- make
- podman-tests
adjust:
duration: 10m
when: arch == aarch64
/system_test:
tag: [ upstream, downstream ]
summary: Run crun specific Podman tests
test: bash ./system-test.sh

View File

@ -11,6 +11,6 @@ cat /etc/redhat-release
rpm -q conmon containers-common crun podman podman-tests
# Run crun specific podman tests
bats -t /usr/share/podman/test/system/030-run.bats
bats -t /usr/share/podman/test/system/075-exec.bats
bats -t /usr/share/podman/test/system/280-update.bats
/usr/bin/bats -t /usr/share/podman/test/system/030-run.bats
/usr/bin/bats -t /usr/share/podman/test/system/075-exec.bats
/usr/bin/bats -t /usr/share/podman/test/system/280-update.bats

View File

@ -1,5 +1,3 @@
require: [crun, podman]
summary: Sanity test for crun
tag: ['upstream', 'downstream']
test: bash ./runtest.sh
duration: 10m