Skip to content

Commit c29d2fb

Browse files
committed
tmt: Try to describe how to reproduce tmt+packages locally
The whole chain of packit -> tmt+testing-farm is very complicated and I struggle to wrap my head around it even *without* involving bootc. With a bit of AI assistance we came up with this, which I didn't try yet truly running and clearly if we were to do so we'd need to automate it. And doing *that* really is probably going to pull us to split out "build an rpm" from "build a container" because the former is what the packit flow wants today. xref teemtee/tmt#1018 Signed-off-by: Colin Walters <[email protected]>
1 parent 5daa432 commit c29d2fb

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

tmt/plans/integration.fmf

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
# Note that this provisioning defaults to using a locally built bootc
2+
# disk image. The default runs in Github Actions use nested KVM
3+
# to run most of these tests.
4+
#
5+
# However, Packit+Testing Farm provisions a stock package-based
6+
# cloud VM. When it does that, it ignores the `provision:` tag
7+
# here, sets running_env=packit, and installs the build artifacts to
8+
# /var/share/test-artifacts/. The prepare phase then builds a bootc
9+
# image and reinstalls the system.
10+
#
11+
# The idea here is all of our tests should work when started from
12+
# a package-based host *or* an image-based one.
13+
#
14+
# For local testing:
15+
# - Standard workflow: Use tests/run-tmt.sh (builds bootc image first, sets running_env=image_mode)
16+
#
17+
# To reproduce Testing Farm workflow locally with testcloud:
18+
# Testing Farm provisions a stock cloud VM, creates a yum repo for the copr build artifacts,
19+
# installs binary RPMs (bootc, system-reinstall-bootc), and places the SRPM in
20+
# /var/share/test-artifacts/. The prepare phase then builds a bootc container image and
21+
# reinstalls the system. To reproduce locally:
22+
#
23+
# 1. Build packages in current directory:
24+
# fedpkg --release f42 srpm
25+
# mock -r fedora-42-x86_64 --resultdir=. bootc-*.src.rpm
26+
# 2. Run with inserted prepare steps to set up artifacts on the VM:
27+
# tmt --context running_env=packit run -a \
28+
# provision -h virtual --image fedora \
29+
# prepare --insert --order 96 -h install -p createrepo_c \
30+
# prepare --insert --order 96 -h shell \
31+
# -s 'mkdir -p /var/share/test-artifacts /var/tmp/bootc-repo' \
32+
# -s 'cp bootc-*.src.rpm /var/share/test-artifacts/' \
33+
# -s 'cp bootc-*.rpm system-reinstall-bootc-*.rpm /var/tmp/bootc-repo/' \
34+
# -s 'createrepo_c /var/tmp/bootc-repo' \
35+
# -s 'printf "[test-artifacts]\nname=test-artifacts\nbaseurl=file:///var/tmp/bootc-repo\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/test-artifacts.repo'
36+
#
37+
# Note: tmt syncs the test tree (including files in current directory) to the guest.
138
provision:
239
how: virtual
340
image: $@{test_disk_image}

0 commit comments

Comments
 (0)