mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13: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
|
@ -35,8 +35,6 @@ import os
|
|||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import tarfile
|
||||
import zipfile
|
||||
|
||||
from typing import (
|
||||
List,
|
||||
|
@ -260,19 +258,12 @@ class AcpiBitsTest(QemuSystemTest): #pylint: disable=too-many-instance-attribute
|
|||
%(self.BITS_INTERNAL_VER,
|
||||
self.BITS_COMMIT_HASH))
|
||||
|
||||
bitsLocalArtLoc = self.ASSET_BITS.fetch()
|
||||
self.logger.info("downloaded bits artifacts to %s", bitsLocalArtLoc)
|
||||
|
||||
# extract the bits artifact in the temp working directory
|
||||
with zipfile.ZipFile(bitsLocalArtLoc, 'r') as zref:
|
||||
zref.extractall(prebuiltDir)
|
||||
self.archive_extract(self.ASSET_BITS, sub_dir='prebuilt', format='zip')
|
||||
|
||||
# extract the bits software in the temp working directory
|
||||
with zipfile.ZipFile(bits_zip_file, 'r') as zref:
|
||||
zref.extractall(self.workdir)
|
||||
|
||||
with tarfile.open(grub_tar_file, 'r', encoding='utf-8') as tarball:
|
||||
tarball.extractall(self.workdir)
|
||||
self.archive_extract(bits_zip_file)
|
||||
self.archive_extract(grub_tar_file)
|
||||
|
||||
self.copy_test_scripts()
|
||||
self.copy_bits_config()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue