Skip to content

Commit 3b9ec25

Browse files
committed
tests/functional: update tuxruntest to use uncompress utility
Use the utility functions to reduce code duplication. Reviewed-by: Thomas Huth <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Message-Id: <[email protected]>
1 parent e6c9ab0 commit 3b9ec25

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

tests/functional/qemu_test/tuxruntest.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,7 @@ def fetch_tuxrun_assets(self, kernel_asset, rootfs_asset, dtb_asset=None):
7373
Fetch the TuxBoot assets.
7474
"""
7575
kernel_image = kernel_asset.fetch()
76-
disk_image_zst = rootfs_asset.fetch()
77-
78-
disk_image = self.scratch_file("rootfs.ext4")
79-
80-
check_call(['zstd', "-f", "-d", disk_image_zst,
81-
"-o", disk_image],
82-
stdout=DEVNULL, stderr=DEVNULL)
83-
# zstd copies source archive permissions for the output
84-
# file, so must make this writable for QEMU
85-
os.chmod(disk_image, stat.S_IRUSR | stat.S_IWUSR)
86-
76+
disk_image = self.uncompress(rootfs_asset)
8777
dtb = dtb_asset.fetch() if dtb_asset is not None else None
8878

8979
return (kernel_image, disk_image, dtb)

0 commit comments

Comments
 (0)