From 81d3d182d7da69dc508590930c260be361fea390 Mon Sep 17 00:00:00 2001 From: Alberto Faria Date: Tue, 23 Apr 2024 14:38:10 +0100 Subject: [PATCH] Reinstate testing farm tests Signed-off-by: Alberto Faria --- .fmf/version | 1 + .packit.yaml | 20 +++++++++++++++++- plans/tests.fmf | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/env.sh | 2 +- 4 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/tests.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.packit.yaml b/.packit.yaml index c110485..d376353 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -28,7 +28,6 @@ jobs: - "copr://rhcontainerbot/podman-next" enable_net: true - # Run on commit to main branch - job: copr_build trigger: commit notifications: @@ -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 diff --git a/plans/tests.fmf b/plans/tests.fmf new file mode 100644 index 0000000..ec84c18 --- /dev/null +++ b/plans/tests.fmf @@ -0,0 +1,56 @@ +provision: + hardware: + virtualization: + is-supported: true + +prepare: + - &deps + name: Install dependencies + how: install + package: + - bash + - cargo + - coreutils + - crun + - crun-krun + - 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 + 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 diff --git a/tests/env.sh b/tests/env.sh index e3d730b..5a5274e 100755 --- a/tests/env.sh +++ b/tests/env.sh @@ -173,7 +173,7 @@ build) --name "$container_name-build" \ --runtime "$runtime" \ --memory 8g \ - --rm -dit \ + --rm -it \ --rootfs "$temp_dir" \ --persistent