From f76ade8e74f7c602b8c7f344fec5bfe5985410ed Mon Sep 17 00:00:00 2001 From: Xiaofeng Wang Date: Tue, 18 Jun 2024 15:42:51 +0800 Subject: [PATCH 1/2] test: run tmt integration test on testing farm build.fmf: used to deploy testing farm runner and run tmt integration on it build-tmt.fmf: tmt test to work with discover.fmf which is requited to make .git always present Signed-off-by: Xiaofeng Wang --- plans/build.fmf | 29 +++++++++++++++++++++++++++++ plans/integration.fmf | 6 +++--- tests-integration/build-tmt.fmf | 4 ++++ 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 plans/build.fmf create mode 100644 tests-integration/build-tmt.fmf diff --git a/plans/build.fmf b/plans/build.fmf new file mode 100644 index 00000000..3e957a5f --- /dev/null +++ b/plans/build.fmf @@ -0,0 +1,29 @@ +provision: + hardware: + cpu: + processors: ">= 2" + memory: ">= 6 GB" + virtualization: + is-supported: true +prepare: + - how: install + package: + - cargo + - zstd + - git + - libzstd-devel + - openssl-devel + - ostree-devel + - make + - jq + - podman + - skopeo + - tmt+provision-virtual + - how: shell + script: systemctl start libvirtd +execute: + how: tmt +discover: + how: fmf + test: + - /build-tmt/build-image diff --git a/plans/integration.fmf b/plans/integration.fmf index 17cca1d8..32ac94c3 100644 --- a/plans/integration.fmf +++ b/plans/integration.fmf @@ -4,8 +4,8 @@ provision: how: virtual # Generated by `cargo xtask ` - image: file://./target/testbootc-cloud.qcow2 + image: file://./target/testvm/disk.qcow2 summary: Basic smoke test execute: - how: tmt - script: bootc status + how: tmt + script: bootc status diff --git a/tests-integration/build-tmt.fmf b/tests-integration/build-tmt.fmf new file mode 100644 index 00000000..d8486f20 --- /dev/null +++ b/tests-integration/build-tmt.fmf @@ -0,0 +1,4 @@ +/build-image: + summary: build bootc and build qcow2 image + test: cd .. && make test-tmt + duration: 30m From 9a02584c0ebdec8c2d5cd32fdf76542f9e4f0045 Mon Sep 17 00:00:00 2001 From: Xiaofeng Wang Date: Wed, 19 Jun 2024 22:30:29 +0800 Subject: [PATCH 2/2] test: install some build dependent packages with dnf builddep bootc Signed-off-by: Xiaofeng Wang --- plans/build.fmf | 8 -------- tests-integration/build-tmt.fmf | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/plans/build.fmf b/plans/build.fmf index 3e957a5f..ea68982e 100644 --- a/plans/build.fmf +++ b/plans/build.fmf @@ -8,14 +8,6 @@ provision: prepare: - how: install package: - - cargo - - zstd - - git - - libzstd-devel - - openssl-devel - - ostree-devel - - make - - jq - podman - skopeo - tmt+provision-virtual diff --git a/tests-integration/build-tmt.fmf b/tests-integration/build-tmt.fmf index d8486f20..a56c4b34 100644 --- a/tests-integration/build-tmt.fmf +++ b/tests-integration/build-tmt.fmf @@ -1,4 +1,4 @@ /build-image: summary: build bootc and build qcow2 image - test: cd .. && make test-tmt + test: cd .. && dnf -y builddep bootc && make test-tmt duration: 30m