summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2023-03-13 13:15:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-22 13:53:24 +0000
commit3ee65ecdf841d74e2767d620e7f4a62e3a8863dc (patch)
tree19c35a120bcdf658fd33667d5e1418ecd5ef23f2 /meta
parent6e82c394e98d57a2fe73e547922477cd6b0620f9 (diff)
downloadopenembedded-core-3ee65ecdf841d74e2767d620e7f4a62e3a8863dc.tar.gz
selftest: gdbserver.py: respect IMAGE_LINK_NAME
* use IMAGE_LINK_NAME instead of hardcoding core-image-minimal-${MACHINE} assumption [YOCTO #12937] Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/cases/gdbserver.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/gdbserver.py b/meta/lib/oeqa/selftest/cases/gdbserver.py
index 3621d9c13e..9da97ae780 100644
--- a/meta/lib/oeqa/selftest/cases/gdbserver.py
+++ b/meta/lib/oeqa/selftest/cases/gdbserver.py
@@ -10,13 +10,12 @@ import shutil
import concurrent.futures
from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import bitbake, get_bb_var, runqemu, runCmd
+from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars , runqemu, runCmd
class GdbServerTest(OESelftestTestCase):
def test_gdb_server(self):
target_arch = self.td["TARGET_ARCH"]
target_sys = self.td["TARGET_SYS"]
- deploy_dir = get_bb_var("DEPLOY_DIR_IMAGE")
features = """
IMAGE_GEN_DEBUGFS = "1"
@@ -34,11 +33,13 @@ CORE_IMAGE_EXTRA_INSTALL = "gdbserver"
r = runCmd("%s --version" % gdb_binary, native_sysroot=native_sysroot, target_sys=target_sys)
self.assertEqual(r.status, 0)
self.assertIn("GNU gdb", r.output)
+ image = 'core-image-minimal'
+ bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image)
with tempfile.TemporaryDirectory(prefix="debugfs-") as debugfs:
- filename = os.path.join(deploy_dir, "core-image-minimal-%s-dbg.tar.bz2" % self.td["MACHINE"])
+ filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.tar.bz2" % bb_vars['IMAGE_LINK_NAME'])
shutil.unpack_archive(filename, debugfs)
- filename = os.path.join(deploy_dir, "core-image-minimal-%s.tar.bz2" % self.td["MACHINE"])
+ filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.tar.bz2" % bb_vars['IMAGE_LINK_NAME'])
shutil.unpack_archive(filename, debugfs)
with runqemu("core-image-minimal", runqemuparams="nographic") as qemu: