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/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..0e7fe82 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,60 @@ +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 + +/tests: + 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 + +/tests/docker: + summary: Run all tests under Docker + environment: + ENGINE: docker + +/tests/podman: + summary: Run all tests under Podman + environment: + ENGINE: podman + +/tests/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