Skip to content

Commit e1c7f45

Browse files
committed
xtask: Add distro-aware bind-storage-ro support for tmt tests
CentOS 9 lacks systemd.extra-unit.* support which is required for --bind-storage-ro to work with bcvk. This was causing test failures on centos-9 while working fine on Fedora. Change the approach so tests express intent via `extra.try_bind_storage: true` metadata, and xtask handles the details: - Detect distro by running the container image and parsing os-release - Pass distro to tmt via --context=distro=<id>-<version> - Only add --bind-storage-ro when test wants it AND distro supports it - When bind storage is available, also set BOOTC_upgrade_image env var - Tests can detect missing $env.BOOTC_upgrade_image and fall back to building the upgrade image locally Add --upgrade-image CLI option to specify the upgrade image path, replacing the old --env=BOOTC_upgrade_image approach. Extract magic values to clear const declarations at the top of the file for better maintainability. Assisted-by: Claude Code (Sonnet 4.5) Signed-off-by: Colin Walters <walters@verbum.org>
1 parent bacee99 commit e1c7f45

File tree

4 files changed

+233
-43
lines changed

4 files changed

+233
-43
lines changed

Justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ _build-upgrade-image:
119119
# Assume the localhost/bootc-integration image is up to date, and just run tests.
120120
# Useful for iterating on tests quickly.
121121
test-tmt-nobuild *ARGS:
122-
cargo xtask run-tmt --env=BOOTC_variant={{variant}} --env=BOOTC_upgrade_image={{integration_upgrade_img}} {{integration_img}} {{ARGS}}
122+
cargo xtask run-tmt --env=BOOTC_variant={{variant}} --upgrade-image={{integration_upgrade_img}} {{integration_img}} {{ARGS}}
123123

124124
# Cleanup all test VMs created by tmt tests
125125
tmt-vm-cleanup:

0 commit comments

Comments
 (0)