mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
tests/functional: convert tests to new archive_extract helper
Replace use of utils.archive_extract and extract_from_deb with the new archive_extract helper. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20241217155953.3950506-24-berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
239fd29d6f
commit
5831ed84e7
37 changed files with 134 additions and 205 deletions
|
@ -50,11 +50,11 @@ class BananaPiMachine(LinuxKernelTest):
|
|||
|
||||
def test_arm_orangepi(self):
|
||||
self.set_machine('orangepi-pc')
|
||||
deb_path = self.ASSET_DEB.fetch()
|
||||
kernel_path = self.extract_from_deb(deb_path,
|
||||
'/boot/vmlinuz-6.6.16-current-sunxi')
|
||||
dtb_path = '/usr/lib/linux-image-6.6.16-current-sunxi/sun8i-h3-orangepi-pc.dtb'
|
||||
dtb_path = self.extract_from_deb(deb_path, dtb_path)
|
||||
kernel_path = self.archive_extract(
|
||||
self.ASSET_DEB, member='boot/vmlinuz-6.6.16-current-sunxi')
|
||||
dtb_path = ('usr/lib/linux-image-6.6.16-current-sunxi/' +
|
||||
'sun8i-h3-orangepi-pc.dtb')
|
||||
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
|
||||
|
||||
self.vm.set_console()
|
||||
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
|
||||
|
@ -71,11 +71,11 @@ class BananaPiMachine(LinuxKernelTest):
|
|||
|
||||
def test_arm_orangepi_initrd(self):
|
||||
self.set_machine('orangepi-pc')
|
||||
deb_path = self.ASSET_DEB.fetch()
|
||||
kernel_path = self.extract_from_deb(deb_path,
|
||||
'/boot/vmlinuz-6.6.16-current-sunxi')
|
||||
dtb_path = '/usr/lib/linux-image-6.6.16-current-sunxi/sun8i-h3-orangepi-pc.dtb'
|
||||
dtb_path = self.extract_from_deb(deb_path, dtb_path)
|
||||
kernel_path = self.archive_extract(
|
||||
self.ASSET_DEB, member='boot/vmlinuz-6.6.16-current-sunxi')
|
||||
dtb_path = ('usr/lib/linux-image-6.6.16-current-sunxi/' +
|
||||
'sun8i-h3-orangepi-pc.dtb')
|
||||
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
|
||||
initrd_path_gz = self.ASSET_INITRD.fetch()
|
||||
initrd_path = self.scratch_file('rootfs.cpio')
|
||||
gzip_uncompress(initrd_path_gz, initrd_path)
|
||||
|
@ -107,11 +107,11 @@ class BananaPiMachine(LinuxKernelTest):
|
|||
def test_arm_orangepi_sd(self):
|
||||
self.set_machine('orangepi-pc')
|
||||
self.require_netdev('user')
|
||||
deb_path = self.ASSET_DEB.fetch()
|
||||
kernel_path = self.extract_from_deb(deb_path,
|
||||
'/boot/vmlinuz-6.6.16-current-sunxi')
|
||||
dtb_path = '/usr/lib/linux-image-6.6.16-current-sunxi/sun8i-h3-orangepi-pc.dtb'
|
||||
dtb_path = self.extract_from_deb(deb_path, dtb_path)
|
||||
kernel_path = self.archive_extract(
|
||||
self.ASSET_DEB, member='boot/vmlinuz-6.6.16-current-sunxi')
|
||||
dtb_path = ('usr/lib/linux-image-6.6.16-current-sunxi/' +
|
||||
'sun8i-h3-orangepi-pc.dtb')
|
||||
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
|
||||
rootfs_path_xz = self.ASSET_ROOTFS.fetch()
|
||||
rootfs_path = self.scratch_file('rootfs.cpio')
|
||||
lzma_uncompress(rootfs_path_xz, rootfs_path)
|
||||
|
@ -189,13 +189,12 @@ class BananaPiMachine(LinuxKernelTest):
|
|||
def test_arm_orangepi_uboot_netbsd9(self):
|
||||
self.set_machine('orangepi-pc')
|
||||
# This test download a 304MB compressed image and expand it to 2GB
|
||||
deb_path = self.ASSET_UBOOT.fetch()
|
||||
# We use the common OrangePi PC 'plus' build of U-Boot for our secondary
|
||||
# program loader (SPL). We will then set the path to the more specific
|
||||
# OrangePi "PC" device tree blob with 'setenv fdtfile' in U-Boot prompt,
|
||||
# before to boot NetBSD.
|
||||
uboot_path = '/usr/lib/u-boot/orangepi_plus/u-boot-sunxi-with-spl.bin'
|
||||
uboot_path = self.extract_from_deb(deb_path, uboot_path)
|
||||
uboot_path = 'usr/lib/u-boot/orangepi_plus/u-boot-sunxi-with-spl.bin'
|
||||
uboot_path = self.archive_extract(self.ASSET_UBOOT, member=uboot_path)
|
||||
image_path_gz = self.ASSET_NETBSD.fetch()
|
||||
image_path = self.scratch_file('armv7.img')
|
||||
gzip_uncompress(image_path_gz, image_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue