Skip to content

Commit

Permalink
Reinstate testing farm tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Faria <[email protected]>
  • Loading branch information
albertofaria committed Apr 24, 2024
1 parent 2e44524 commit 6b1086d
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 2 deletions.
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
20 changes: 19 additions & 1 deletion .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- "copr://rhcontainerbot/podman-next"
enable_net: true

# Run on commit to main branch
- job: copr_build
trigger: commit
notifications:
Expand All @@ -38,3 +37,22 @@ jobs:
owner: rhcontainerbot
project: podman-next
enable_net: true

- &tests
job: tests
trigger: pull_request
skip_build: true
enable_net: true
targets:
- fedora-all-x86_64
- fedora-all-aarch64
identifier: docker
tmt_plan: /tests/docker

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

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

prepare: &prepare
- name: Install dependencies
how: install
package:
- bash
- cargo
- coreutils
- crun
- crun-krun
- genisoimage
- grep
- libselinux-devel
- libvirt-client
- libvirt-daemon-driver-qemu
- openssh
- openssh-clients
- passt
- 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
tests/env.sh build
tests/env.sh start
tests/env.sh run "$ENGINE" all

/docker:
summary: Run all tests under Docker
prepare:
- *prepare
- name: Install Docker
how: install
package:
- docker
environment:
ENGINE: docker

/podman:
summary: Run all tests under Podman
prepare:
- *prepare
- name: Install Podman
how: install
package:
- podman
environment:
ENGINE: podman

/rootful-podman:
summary: Run all tests under Rootful Podman
prepare:
- *prepare
- name: Install Podman
how: install
package:
- 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 @@ -173,7 +173,7 @@ build)
--name "$container_name-build" \
--runtime "$runtime" \
--memory 8g \
--rm -dit \
--rm -it \
--rootfs "$temp_dir" \
--persistent

Expand Down

0 comments on commit 6b1086d

Please sign in to comment.