summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
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
10import concurrent.futures 10import concurrent.futures
11 11
12from oeqa.selftest.case import OESelftestTestCase 12from oeqa.selftest.case import OESelftestTestCase
13from oeqa.utils.commands import bitbake, get_bb_var, runqemu, runCmd 13from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars , runqemu, runCmd
14 14
15class GdbServerTest(OESelftestTestCase): 15class GdbServerTest(OESelftestTestCase):
16 def test_gdb_server(self): 16 def test_gdb_server(self):
17 target_arch = self.td["TARGET_ARCH"] 17 target_arch = self.td["TARGET_ARCH"]
18 target_sys = self.td["TARGET_SYS"] 18 target_sys = self.td["TARGET_SYS"]
19 deploy_dir = get_bb_var("DEPLOY_DIR_IMAGE")
20 19
21 features = """ 20 features = """
22IMAGE_GEN_DEBUGFS = "1" 21IMAGE_GEN_DEBUGFS = "1"
@@ -34,11 +33,13 @@ CORE_IMAGE_EXTRA_INSTALL = "gdbserver"
34 r = runCmd("%s --version" % gdb_binary, native_sysroot=native_sysroot, target_sys=target_sys) 33 r = runCmd("%s --version" % gdb_binary, native_sysroot=native_sysroot, target_sys=target_sys)
35 self.assertEqual(r.status, 0) 34 self.assertEqual(r.status, 0)
36 self.assertIn("GNU gdb", r.output) 35 self.assertIn("GNU gdb", r.output)
36 image = 'core-image-minimal'
37 bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image)
37 38
38 with tempfile.TemporaryDirectory(prefix="debugfs-") as debugfs: 39 with tempfile.TemporaryDirectory(prefix="debugfs-") as debugfs:
39 filename = os.path.join(deploy_dir, "core-image-minimal-%s-dbg.tar.bz2" % self.td["MACHINE"]) 40 filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.tar.bz2" % bb_vars['IMAGE_LINK_NAME'])
40 shutil.unpack_archive(filename, debugfs) 41 shutil.unpack_archive(filename, debugfs)
41 filename = os.path.join(deploy_dir, "core-image-minimal-%s.tar.bz2" % self.td["MACHINE"]) 42 filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.tar.bz2" % bb_vars['IMAGE_LINK_NAME'])
42 shutil.unpack_archive(filename, debugfs) 43 shutil.unpack_archive(filename, debugfs)
43 44
44 with runqemu("core-image-minimal", runqemuparams="nographic") as qemu: 45 with runqemu("core-image-minimal", runqemuparams="nographic") as qemu: