Skip to content

Commit cedbd85

Browse files
tmt/test/bib-build: Save disk image in /var/output
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
1 parent ed20ce4 commit cedbd85

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tmt/tests/booted/test-bib-build.nu

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const BIB_IMAGE = "quay.io/centos-bootc/bootc-image-builder:latest"
2626
def main [] {
2727
tap begin "bootc-image-builder qcow2 build test"
2828

29+
print ">>>>>>>>>>>>>>>>>> the current working directory <<<<<<<<<<<<<<<<<" ($env.PWD)
30+
2931
let td = mktemp -d
3032
cd $td
3133

@@ -87,8 +89,10 @@ DISKEOF
8789
' | save Dockerfile
8890
podman build -t localhost/bootc-bib-test .
8991

92+
let output_dir = "/var/output"
93+
9094
# Create output directory for bib
91-
mkdir output
95+
mkdir $output_dir
9296

9397
# Run bootc-image-builder to create a qcow2
9498
# We use --local to pull from local containers-storage
@@ -97,11 +101,11 @@ DISKEOF
97101
let bib_image = $BIB_IMAGE
98102
# Note: we disable SELinux labeling since we're running in a test VM
99103
# and use unconfined_t to avoid permission issues
100-
podman run --rm --privileged -v /var/lib/containers/storage:/var/lib/containers/storage --security-opt label=type:unconfined_t -v ./output:/output $bib_image --type qcow2 --rootfs xfs localhost/bootc-bib-test
104+
podman run --rm --privileged -v /var/lib/containers/storage:/var/lib/containers/storage --security-opt label=type:unconfined_t -v $"($output_dir):/output" $bib_image --type qcow2 --rootfs xfs localhost/bootc-bib-test
101105

102106
# Verify output was created
103107
print "=== Verifying output ==="
104-
let disk_path = "output/qcow2/disk.qcow2"
108+
let disk_path = $"($output_dir)/qcow2/disk.qcow2"
105109
assert ($disk_path | path exists) $"Expected disk image at ($disk_path)"
106110

107111
# Check the disk has reasonable virtual size (at least 4GB as per disk.yaml)

0 commit comments

Comments
 (0)