From 89662ee9068534e95d7ff3179e0afcaa21f97dcc 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 | 11 ++++++++++ plans/test.fmf | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/env.sh | 2 +- 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 .fmf/version create mode 100644 plans/test.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..2886726 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -38,3 +38,14 @@ jobs: owner: rhcontainerbot project: podman-next enable_net: true + + # Tests + - job: tests + trigger: pull_request + skip_build: true + targets: + - fedora-all-x86_64 + - fedora-all-aarch64 + identifier: test + tmt_plan: /plans/test + enable_net: true diff --git a/plans/test.fmf b/plans/test.fmf new file mode 100644 index 0000000..989663e --- /dev/null +++ b/plans/test.fmf @@ -0,0 +1,59 @@ +provision: + hardware: + virtualization: + is-supported: true + +prepare: + - name: Install dependencies + how: install + missing: skip + package: + - bash + - cargo + - coreutils + - crun + - crun-krun + - genisoimage + - grep + - guestfs-tools + - libselinux-devel + - passt + - podman + - qemu-img + - qemu-system-aarch64-core + - qemu-system-x86_64-core + - ssh + - util-linux + - virsh + - virtiofsd + - virtlogd + - virtqemud + - name: Set up libvirt + how: shell + script: + - systemctl start virtqemud + +summary: Test +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