Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinstate testing farm tests #59

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
21 changes: 21 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,24 @@ jobs:
owner: rhcontainerbot
project: podman-next
enable_net: true

- &tests
job: tests
trigger: pull_request
skip_build: true
enable_net: true
targets:
# TODO: Replace these three with fedora-all-x86_64 once Fedora 38 is gone.
- fedora-rawhide-x86_64
- fedora-40-x86_64
- fedora-39-x86_64
identifier: docker
tmt_plan: /tests/docker

- <<: *tests
identifier: podman
tmt_plan: /tests/podman

- <<: *tests
identifier: rootful-podman
tmt_plan: /tests/rootful-podman
60 changes: 60 additions & 0 deletions plans/tests.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
provision:
hardware:
virtualization:
is-supported: true

prepare:
- name: Install dependencies
how: install
package:
- bash
- cargo
- coreutils
- crun
- docker
- genisoimage
- grep
- guestfs-tools
- libselinux-devel
- libvirt-client
- libvirt-daemon-driver-qemu
- openssh
- openssh-clients
- passt
- podman
- qemu-img
- qemu-system-aarch64-core
- qemu-system-x86-core
- sed
- util-linux
- virtiofsd

execute:
how: tmt
script: |
set -ex
export PATH=$PATH:/root/.cargo/bin LIBGUESTFS_BACKEND=direct

# set the test VM's Fedora version to the host's to run the tests under the
# requested environment
tag=$( awk -F= '/^VERSION_ID=/ {print tolower($2)}' /etc/os-release )
export CRUN_VM_TEST_ENV_BASE_IMAGE=quay.io/containerdisks/fedora:$tag

tests/env.sh build
tests/env.sh start
tests/env.sh run "$ENGINE" all

/docker:
summary: Run all tests under Docker
environment:
ENGINE: docker

/podman:
summary: Run all tests under Podman
environment:
ENGINE: podman

/rootful-podman:
summary: Run all tests under Rootful Podman
environment:
ENGINE: rootful-podman
2 changes: 1 addition & 1 deletion tests/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o errexit -o pipefail -o nounset

start_time="$( date +%s%N )"

env_image_base=quay.io/containerdisks/fedora:40
env_image_base=${CRUN_VM_TEST_ENV_BASE_IMAGE:-"quay.io/containerdisks/fedora:40"}
env_image=quay.io/crun-vm/test-env:latest
container_name=crun-vm-test-env

Expand Down