mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
selftest/gdbserver: replace shutil.unpack_archive with tarfile extract
This is a followup to https://lists.openembedded.org/g/openembedded-core/message/233609 as the same issue happened in a different selftest. [YOCTO #16195] (From OE-Core rev: 948028ca3466fb7071ee49000e847d6e886e349c) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c7468e70c238b056acbe06ef722b62b02626db8f) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev>
This commit is contained in:
committed by
Paul Barker
parent
e13525ed22
commit
71edfb1de8
@@ -7,6 +7,7 @@ import os
|
|||||||
import time
|
import time
|
||||||
import tempfile
|
import tempfile
|
||||||
import shutil
|
import shutil
|
||||||
|
import tarfile
|
||||||
import concurrent.futures
|
import concurrent.futures
|
||||||
|
|
||||||
from oeqa.selftest.case import OESelftestTestCase
|
from oeqa.selftest.case import OESelftestTestCase
|
||||||
@@ -40,7 +41,8 @@ CORE_IMAGE_EXTRA_INSTALL = "gdbserver"
|
|||||||
filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.tar.bz2" % bb_vars['IMAGE_LINK_NAME'])
|
filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.tar.bz2" % bb_vars['IMAGE_LINK_NAME'])
|
||||||
shutil.unpack_archive(filename, debugfs)
|
shutil.unpack_archive(filename, debugfs)
|
||||||
filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.tar.bz2" % bb_vars['IMAGE_LINK_NAME'])
|
filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.tar.bz2" % bb_vars['IMAGE_LINK_NAME'])
|
||||||
shutil.unpack_archive(filename, debugfs)
|
with tarfile.open(filename) as tar:
|
||||||
|
tar.extract("./bin/kmod", path=debugfs)
|
||||||
|
|
||||||
with runqemu("core-image-minimal", runqemuparams="nographic") as qemu:
|
with runqemu("core-image-minimal", runqemuparams="nographic") as qemu:
|
||||||
status, output = qemu.run_serial("kmod --help")
|
status, output = qemu.run_serial("kmod --help")
|
||||||
|
|||||||
Reference in New Issue
Block a user