Skip to content

Commit

Permalink
Merge pull request #1449 from lsm5/rpm-rhel-wasm
Browse files Browse the repository at this point in the history
Packit/TMT: cleanup tests
  • Loading branch information
giuseppe authored Apr 26, 2024
2 parents d075e53 + aa72cc4 commit 6df8cef
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 40 deletions.
14 changes: 12 additions & 2 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- fedora-all-aarch64
- fedora-eln-x86_64
- fedora-eln-aarch64
- epel-8-x86_64
- epel-8-aarch64
- epel-9-x86_64
- epel-9-aarch64
- centos-stream-10-x86_64
- centos-stream-10-aarch64
additional_repos:
- "copr://rhcontainerbot/podman-next"

Expand All @@ -51,6 +51,10 @@ jobs:
- fedora-all-aarch64
- epel-9-x86_64
- epel-9-aarch64
# TODO: Enable cs10 tests after netavark has finished defaulting to
# nftables
#- centos-stream-10-x86_64
#- centos-stream-10-aarch64
identifier: podman_system_test
tmt_plan: "/plans/podman_system_test"

Expand All @@ -64,6 +68,12 @@ jobs:
distros: [RHEL-9.4.0-Nightly,RHEL-9-Nightly]
epel-9-aarch64:
distros: [RHEL-9.4.0-Nightly,RHEL-9-Nightly]
# TODO: Enable cs10 tests after netavark has finished defaulting to
# nftables
#centos-stream-10-x86_64:
# distros: [RHEL-10-Beta-Nightly]
#centos-stream-10-aarch64:
# distros: [RHEL-10-Beta-Nightly]
identifier: podman_system_test_internal
tmt_plan: "/plans/podman_system_test"

Expand Down
38 changes: 33 additions & 5 deletions plans/main.fmf
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
## Note: "order" is set to 50 by default. Orders with lower values are
## prioritized.
## Ref: https://tmt.readthedocs.io/en/stable/spec/core.html#order

adjust:
- environment:
PODMAN_IGNORE_CGROUPSV1_WARNING: "true"
when: distro == rhel-8 or distro == centos-stream-8
because: el8 uses cgroups-v1
- when: distro != fedora
prepare+:
- how: shell
order: 20
script: rpm -q epel-release || dnf -y install https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/Packages/e/epel-release-9-7.el9.noarch.rpm
because: Need `bats` to run podman system tests, present by default on Fedora but RHEL and CentOS Stream need to use EPEL repos.
- when: distro == fedora
prepare+:
- how: shell
order: 20
script: dnf config-manager --set-disabled testing-farm-tag-repository
because: We don't want to use this repository for Fedora tests.
- when: distro != centos-stream-10 and distro != rhel-10
prepare+:
- how: shell
order: 30
script: dnf -y copr enable rhcontainerbot/podman-next
because: We can't use the idiomatic `copr` key globally because of non-default instructions for centos-stream-10.
- when: distro == centos-stream-10 or distro == rhel-10
prepare+:
- how: shell
order: 30
script: |
sed -i "s/\$releasever/9/g" /etc/yum.repos.d/epel.repo
dnf -y copr enable rhcontainerbot/podman-next centos-stream-10
because: The default epel-10 target doesn't exist yet.

prepare:
# Ensure podman-next has higher priority than default repos
- how: shell
script: bash ./plans/prepare.sh
script: dnf config-manager --save --setopt="*:rhcontainerbot:podman-next.priority=5"
# Install packages to run podman revdep tests
- how: install
package:
- bats
Expand Down
2 changes: 1 addition & 1 deletion plans/podman_system_test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -eox pipefail
set -exo pipefail

cat /etc/redhat-release
rpm -q crun podman podman-tests
Expand Down
26 changes: 0 additions & 26 deletions plans/prepare.sh

This file was deleted.

18 changes: 12 additions & 6 deletions rpm/crun.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
%ifarch aarch64 || x86_64
%global wasm_support 1

%if %{defined fedora} || %{defined copr_project}
%if %{defined copr_project}
%define copr_build 1
%endif

%if %{defined fedora} || %{defined copr_build}
%global wasmedge_support 1
%global wasmedge_opts --with-wasmedge
%endif
Expand All @@ -27,7 +31,7 @@

Summary: OCI runtime written in C
Name: crun
%if %{defined copr_username}
%if %{defined copr_build}
Epoch: 102
%endif
# DO NOT TOUCH the Version string!
Expand Down Expand Up @@ -70,11 +74,7 @@ BuildRequires: wasmedge-devel
%if %{defined wasmtime_support}
BuildRequires: wasmtime-c-api-devel
%endif
%if %{defined rhel} && 0%{?rhel} == 8
BuildRequires: python3
%else
BuildRequires: python
%endif
Provides: oci-runtime

%description
Expand All @@ -95,7 +95,13 @@ krun is a symlink to the %{name} binary, with libkrun as an additional dependenc
%package wasm
Summary: %{name} with wasm support
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
# The hard dep on wasm-library is causing trouble in internal testing farm
# with RHEL.
%if %{defined fedora}
Requires: wasm-library
%else
Recommends: wasm-library
%endif
Recommends: wasmedge

%description wasm
Expand Down

0 comments on commit 6df8cef

Please sign in to comment.