From 869804f487872c2c9fee258f149ce12b1b9846b6 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Tue, 21 Jan 2025 16:24:50 +0530 Subject: [PATCH] TMT: account for environments on internal testing farm ranch RHEL envs on the internal redhat testing farm ranch don't have any easy way to install and enable the `epel-release` package. Also, CentOS-Stream envs on the internal ranch have EPEL installed but disabled. This PR should account for both these envs. The tests on public ranch should continue unaffected. The packages required for testing have also been moved to the plan preparation stage itself. Signed-off-by: Lokesh Mandvekar --- plans/main.fmf | 20 ++++++++++++++++---- tests/tmt/podman/system-test.fmf | 7 ------- tests/tmt/sanity/main.fmf | 1 - 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/plans/main.fmf b/plans/main.fmf index 10bf493e1..1328f776a 100644 --- a/plans/main.fmf +++ b/plans/main.fmf @@ -3,14 +3,26 @@ discover: execute: how: tmt prepare: - - how: feature - epel: enabled + - when: distro == centos-stream or distro == rhel + how: shell + script: | + dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm --eval '%{?rhel}').noarch.rpm + dnf -y config-manager --set-enabled epel + order: 10 - when: initiator == packit - because: "We need to test with updated packages from rhcontainerbot/podman-next copr" how: shell script: | - sed -i -n '/^priority=/!p;$apriority=1' /etc/yum.repos.d/*podman-next*.repo + COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo" + if compgen -G $COPR_REPO_FILE > /dev/null; then + sed -i -n '/^priority=/!p;$apriority=1' $COPR_REPO_FILE + fi dnf -y upgrade --allowerasing + order: 20 + - how: install + package: + - bats + - crun + - podman-tests /upstream: summary: Run crun specific Podman system tests on upstream PRs diff --git a/tests/tmt/podman/system-test.fmf b/tests/tmt/podman/system-test.fmf index 9beb3c9ac..1032f0774 100644 --- a/tests/tmt/podman/system-test.fmf +++ b/tests/tmt/podman/system-test.fmf @@ -1,10 +1,3 @@ -require: - - bats - - conmon - - crun - - make - - podman-tests - adjust: duration: 10m when: arch == aarch64 diff --git a/tests/tmt/sanity/main.fmf b/tests/tmt/sanity/main.fmf index f4303510a..6355ff63f 100644 --- a/tests/tmt/sanity/main.fmf +++ b/tests/tmt/sanity/main.fmf @@ -1,4 +1,3 @@ -require: [crun, podman] summary: Sanity test for crun tag: ['upstream', 'downstream'] test: bash ./runtest.sh