diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2019-10-28 19:04:04 -0400 |
---|---|---|
committer | Cleber Rosa <crosa@redhat.com> | 2019-10-28 19:04:04 -0400 |
commit | f2cd6cf64911bc367713d8c539a53354e6e3eee5 (patch) | |
tree | 327abc6eda8f70a8fd568c8a71817f945ca08f4a /tests/acceptance | |
parent | 83703220f5ddca303a4bc104aa505ca1773bf7fc (diff) | |
download | qemu-f2cd6cf64911bc367713d8c539a53354e6e3eee5.zip qemu-f2cd6cf64911bc367713d8c539a53354e6e3eee5.tar.gz qemu-f2cd6cf64911bc367713d8c539a53354e6e3eee5.tar.bz2 |
tests/boot_linux_console: Use Avocado archive::gzip_uncompress()
Avocado 67.0 [*] introduced the avocado.utils.archive module which
provides handling of gzip files. Use the gzip_uncompress() method.
[*] https://avocado-framework.readthedocs.io/en/67.0/api/utils/avocado.utils.html#avocado.utils.archive.gzip_uncompress
Suggested-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20191028073441.6448-20-philmd@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Diffstat (limited to 'tests/acceptance')
-rw-r--r-- | tests/acceptance/boot_linux_console.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 4b419b0..67d7e96 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -145,10 +145,7 @@ class BootLinuxConsole(Test): initrd_hash = 'bf806e17009360a866bf537f6de66590de349a99' initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) initrd_path = self.workdir + "rootfs.cpio" - - with gzip.open(initrd_path_gz, 'rb') as f_in: - with open(initrd_path, 'wb') as f_out: - shutil.copyfileobj(f_in, f_out) + archive.gzip_uncompress(initrd_path_gz, initrd_path) self.vm.set_machine('malta') self.vm.set_console() |