[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/8] tests/boot_linux_console: Let extract_from_deb h
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 1/8] tests/boot_linux_console: Let extract_from_deb handle various compressions |
Date: |
Fri, 7 Jun 2019 18:15:37 -0300 |
From: Philippe Mathieu-Daudé <address@hidden>
Debian binary package format supports various compressions.
Per man deb(5):
NAME
deb - Debian binary package format
FORMAT
...
The third, last required member is named data.tar. It contains the
filesystem as a tar archive, either not compressed (supported since
dpkg 1.10.24), or compressed with gzip (with .gz extension),
xz (with .xz extension, supported since dpkg 1.15.6),
bzip2 (with .bz2 extension, supported since dpkg 1.10.24) or
lzma (with .lzma extension, supported since dpkg 1.13.25).
List the archive files to have the 3rd name with the correct extension.
The function avocado.utils.archive.extract() will handle the different
compression format for us.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Cleber Rosa <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
tests/acceptance/boot_linux_console.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/acceptance/boot_linux_console.py
b/tests/acceptance/boot_linux_console.py
index d5c500ea30..6aa084e049 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -55,8 +55,9 @@ class BootLinuxConsole(Test):
"""
cwd = os.getcwd()
os.chdir(self.workdir)
- process.run("ar x %s data.tar.gz" % deb)
- archive.extract("data.tar.gz", self.workdir)
+ file_path = process.run("ar t %s" % deb).stdout_text.split()[2]
+ process.run("ar x %s %s" % (deb, file_path))
+ archive.extract(file_path, self.workdir)
os.chdir(cwd)
return self.workdir + path
--
2.18.0.rc1.1.g3f1ff2140
- [Qemu-devel] [PULL 0/8] Python queue, 2019-06-07, Eduardo Habkost, 2019/06/07
- [Qemu-devel] [PULL 1/8] tests/boot_linux_console: Let extract_from_deb handle various compressions,
Eduardo Habkost <=
- [Qemu-devel] [PULL 4/8] BootLinuxConsoleTest: Do not log empty lines, Eduardo Habkost, 2019/06/07
- [Qemu-devel] [PULL 3/8] configure: Require python3 >= 3.5, Eduardo Habkost, 2019/06/07
- [Qemu-devel] [PULL 5/8] BootLinuxConsoleTest: Test the SmartFusion2 board, Eduardo Habkost, 2019/06/07
- [Qemu-devel] [PULL 2/8] Deprecate Python 2 support, Eduardo Habkost, 2019/06/07
- [Qemu-devel] [PULL 6/8] BootLinuxConsoleTest: Test nanoMIPS kernels on the I7200 CPU, Eduardo Habkost, 2019/06/07
- [Qemu-devel] [PULL 8/8] travis: Make check-acceptance job more verbose, Eduardo Habkost, 2019/06/07
- [Qemu-devel] [PULL 7/8] BootLinuxConsoleTest: Run kerneltests BusyBox on Malta, Eduardo Habkost, 2019/06/07
- Re: [Qemu-devel] [PULL 0/8] Python queue, 2019-06-07, Peter Maydell, 2019/06/10