summary refs log tree commit diff stats
path: root/tests/functional/test_arm_raspi2.py
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2024-12-17 15:59:44 +0000
committerThomas Huth <thuth@redhat.com>2024-12-17 19:39:53 +0100
commit5831ed84e7e450a652f215721aba34ed4e1ffb97 (patch)
tree3e694461d1f99da21aa3e9f5cdd77d50e8ef12af /tests/functional/test_arm_raspi2.py
parent239fd29d6f82724c95a7a7f840c9f9244bcbe6d4 (diff)
downloadfocaccia-qemu-5831ed84e7e450a652f215721aba34ed4e1ffb97.tar.gz
focaccia-qemu-5831ed84e7e450a652f215721aba34ed4e1ffb97.zip
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>
Diffstat (limited to 'tests/functional/test_arm_raspi2.py')
-rwxr-xr-xtests/functional/test_arm_raspi2.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/functional/test_arm_raspi2.py b/tests/functional/test_arm_raspi2.py
index 075f6b3301..5e38d1a937 100755
--- a/tests/functional/test_arm_raspi2.py
+++ b/tests/functional/test_arm_raspi2.py
@@ -35,9 +35,10 @@ class ArmRaspi2Machine(LinuxKernelTest):
         serial_kernel_cmdline = {
             0: 'earlycon=pl011,0x3f201000 console=ttyAMA0',
         }
-        deb_path = self.ASSET_KERNEL_20190215.fetch()
-        kernel_path = self.extract_from_deb(deb_path, '/boot/kernel7.img')
-        dtb_path = self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-b.dtb')
+        kernel_path = self.archive_extract(self.ASSET_KERNEL_20190215,
+                                           member='boot/kernel7.img')
+        dtb_path = self.archive_extract(self.ASSET_KERNEL_20190215,
+                                        member='boot/bcm2709-rpi-2-b.dtb')
 
         self.set_machine('raspi2b')
         self.vm.set_console()
@@ -59,9 +60,10 @@ class ArmRaspi2Machine(LinuxKernelTest):
         self.do_test_arm_raspi2(0)
 
     def test_arm_raspi2_initrd(self):
-        deb_path = self.ASSET_KERNEL_20190215.fetch()
-        kernel_path = self.extract_from_deb(deb_path, '/boot/kernel7.img')
-        dtb_path = self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-b.dtb')
+        kernel_path = self.archive_extract(self.ASSET_KERNEL_20190215,
+                                           member='boot/kernel7.img')
+        dtb_path = self.archive_extract(self.ASSET_KERNEL_20190215,
+                                        member='boot/bcm2709-rpi-2-b.dtb')
         initrd_path_gz = self.ASSET_INITRD.fetch()
         initrd_path = self.scratch_file('rootfs.cpio')
         gzip_uncompress(initrd_path_gz, initrd_path)