From: AdrianF <adrian.freihofer@siemens.com>
To: openembedded-core@lists.openembedded.org
Cc: Adrian Freihofer <adrian.freihofer@siemens.com>
Subject: [PATCH v2 06/25] oe-selftest: devtool ide-sdk: adapt tests for auto-written image debug settings
Date: Sun, 30 Aug 2026 23:48:28 +0200 [thread overview]
Message-ID: <20260830214912.1346063-7-adrian.freihofer@siemens.com> (raw)
In-Reply-To: <20260830214912.1346063-1-adrian.freihofer@siemens.com>
From: Adrian Freihofer <adrian.freihofer@siemens.com>
devtool ide-sdk now writes IMAGE_GEN_DEBUGFS, IMAGE_CLASSES +=
"image-combined-dbg" and the required IMAGE_INSTALL entries
(gdbserver/lldb-server, per-recipe ptest packages) to the image
workspace bbappend automatically. _write_bb_config() therefore no
longer sets these in local.conf, so tests also exercise that ide-sdk
does not need help from local.conf to enable image debug support.
Tests that use runqemu now call devtool ide-sdk once before starting
QEMU to build the image with the debug settings already applied, and
again with --skip-bitbake -t root@<ip> once the real target IP is
known, to update the deploy scripts without triggering a redundant
image rebuild.
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
meta/lib/oeqa/selftest/cases/devtool.py | 111 +++++++++++++-----------
1 file changed, 61 insertions(+), 50 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 87efa1ee80..1ecf4c24f5 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -2889,15 +2889,15 @@ class DevtoolIdeSdkTests(DevtoolBase):
if self.logger.isEnabledFor(logging.DEBUG):
self._cmd_logger = self.logger
- def _write_bb_config(self, recipe_names, extra_packages=None):
- """Helper to write the bitbake local.conf file"""
- image_install = 'gdbserver ' + ' '.join([r + '-ptest' for r in recipe_names])
- if extra_packages:
- image_install += ' ' + ' '.join(extra_packages)
+ def _write_bb_config(self):
+ """Helper to write the bitbake local.conf file.
+
+ Image debug settings (IMAGE_GEN_DEBUGFS, IMAGE_CLASSES += image-combined-dbg,
+ IMAGE_INSTALL for gdbserver/lldb-server and the recipe under test) are written
+ automatically by devtool ide-sdk to the image workspace bbappend.
+ Only settings not managed by ide_sdk are configured here.
+ """
conf_lines = [
- 'IMAGE_CLASSES += "image-combined-dbg"',
- 'IMAGE_GEN_DEBUGFS = "1"',
- 'IMAGE_INSTALL:append = " %s"' % image_install,
'DISTRO_FEATURES:append = " ptest"',
# Static UIDs/GIDs are required so that files installed via
# "install -o ${BPN}" in do_install embed the same UID that gets
@@ -3374,70 +3374,67 @@ class DevtoolIdeSdkGccTests(DevtoolIdeSdkTests):
testimage = "oe-selftest-image"
self._check_workspace()
- self._write_bb_config(recipe_names)
+ self._write_bb_config()
self._check_runqemu_prerequisites()
# Verify deployment to Qemu (system mode) works
- bitbake(testimage)
+ tempdir_cmake = self._devtool_ide_sdk_recipe("cmake-example", "CMakeLists.txt", None)
+ tempdir_meson = self._devtool_ide_sdk_recipe("meson-example", "meson.build", testimage)
+ runCmd('devtool ide-sdk cmake-example meson-example %s -c --ide=none' % testimage,
+ output_log=self._cmd_logger)
+
with runqemu(testimage, runqemuparams="nographic") as qemu:
# cmake-example recipe
recipe_name = "cmake-example"
example_exe = "cmake-example"
example_user_group = "cmake-example"
conf_file = "/etc/cmake-example.conf"
- build_file = "CMakeLists.txt"
# Verify the cmake-example service is running on the target
self._verify_service_running(qemu, example_exe)
# Verify /etc/cmake-example.conf is owned by the cmake-example user
self._verify_conf_file(qemu, conf_file, example_user_group, example_user_group)
- # Setup the recipe with devtool ide-sdk cmake-example ...
- tempdir = self._devtool_ide_sdk_recipe(
- recipe_name, build_file, testimage)
- bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --ide=none' % (
+ # Re-run ide-sdk with the actual QEMU IP; image is already built
+ bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --skip-bitbake --ide=none' % (
recipe_name, testimage, qemu.ip)
runCmd(bitbake_sdk_cmd, output_log=self._cmd_logger)
self._gdb_cross()
- compile_cmd = self._verify_cmake_preset(tempdir)
- self._devtool_ide_sdk_qemu(tempdir, qemu, recipe_name, example_exe, compile_cmd)
+ compile_cmd = self._verify_cmake_preset(tempdir_cmake)
+ self._devtool_ide_sdk_qemu(tempdir_cmake, qemu, recipe_name, example_exe, compile_cmd)
# Verify the oe-scripts sym-link is valid
self.assertEqual(self._workspace_scripts_dir(
- recipe_name), self._sources_scripts_dir(tempdir))
+ recipe_name), self._sources_scripts_dir(tempdir_cmake))
# Verify /etc/cmake-example.conf is still owned by the cmake-example user
# after the install and deploy scripts updated the file
self._verify_conf_file(qemu, conf_file, example_exe, example_exe)
-
# meson-example recipe
recipe_name = "meson-example"
example_exe = "mesonex"
example_user_group = "meson-example"
conf_file = "/etc/meson-example.conf"
- build_file = "meson.build"
# Verify the meson-example service is running on the target
self._verify_service_running(qemu, example_exe)
# Verify /etc/meson-example.conf is owned by the meson-example user
self._verify_conf_file(qemu, conf_file, example_user_group, example_user_group)
- # Setup the recipe with devtool ide-sdk meson-example ...
- tempdir = self._devtool_ide_sdk_recipe(
- recipe_name, build_file, testimage)
- bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --ide=none' % (
+ # Re-run ide-sdk with the actual QEMU IP; image is already built
+ bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --skip-bitbake --ide=none' % (
recipe_name, testimage, qemu.ip)
runCmd(bitbake_sdk_cmd, output_log=self._cmd_logger)
self._gdb_cross()
- compile_cmd = self._verify_meson_build(tempdir, recipe_name)
- self._devtool_ide_sdk_qemu(tempdir, qemu, recipe_name, example_exe, compile_cmd)
+ compile_cmd = self._verify_meson_build(tempdir_meson, recipe_name)
+ self._devtool_ide_sdk_qemu(tempdir_meson, qemu, recipe_name, example_exe, compile_cmd)
# Verify the oe-scripts sym-link is valid
self.assertEqual(self._workspace_scripts_dir(
- recipe_name), self._sources_scripts_dir(tempdir))
+ recipe_name), self._sources_scripts_dir(tempdir_meson))
# Verify /etc/meson-example.conf is still owned by the meson-example user
# after the install and deploy scripts updated the file
@@ -3784,15 +3781,17 @@ class DevtoolIdeSdkGccTests(DevtoolIdeSdkTests):
build_file = "CMakeLists.txt"
self._check_workspace()
- self._write_bb_config([recipe_name])
+ self._write_bb_config()
- # Verify deployment to Qemu (system mode) works
+ # Build image with debug settings before starting QEMU
self._check_runqemu_prerequisites()
- bitbake(testimage)
+ tempdir = self._devtool_ide_sdk_recipe(recipe_name, build_file, testimage)
+ runCmd('devtool ide-sdk %s %s -c --ide=code' % (recipe_name, testimage),
+ output_log=self._cmd_logger)
+
with runqemu(testimage, runqemuparams="nographic") as qemu:
- tempdir = self._devtool_ide_sdk_recipe(
- recipe_name, build_file, testimage)
- bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --ide=code' % (
+ # Re-run with actual QEMU IP; image is already built
+ bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --skip-bitbake --ide=code' % (
recipe_name, testimage, qemu.ip)
runCmd(bitbake_sdk_cmd, output_log=self._cmd_logger)
self._verify_cmake_preset(tempdir)
@@ -3814,15 +3813,18 @@ class DevtoolIdeSdkGccTests(DevtoolIdeSdkTests):
testimage = "oe-selftest-image"
self._check_workspace()
- self._write_bb_config([recipe_name])
+ self._write_bb_config()
- # Verify deployment to Qemu (system mode) works
+ # Build image with debug settings before starting QEMU
self._check_runqemu_prerequisites()
- bitbake(testimage)
+ tempdir = self._devtool_ide_sdk_recipe(
+ recipe_name, build_file, testimage)
+ runCmd('devtool ide-sdk %s %s -c --ide=code' % (recipe_name, testimage),
+ output_log=self._cmd_logger)
+
with runqemu(testimage, runqemuparams="nographic") as qemu:
- tempdir = self._devtool_ide_sdk_recipe(
- recipe_name, build_file, testimage)
- bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --ide=code' % (
+ # Re-run with actual QEMU IP; image is already built
+ bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --skip-bitbake --ide=code' % (
recipe_name, testimage, qemu.ip)
runCmd(bitbake_sdk_cmd, output_log=self._cmd_logger)
@@ -4507,13 +4509,17 @@ class DevtoolIdeSdkClangTests(DevtoolIdeSdkTests):
testimage = "oe-selftest-image"
self._check_workspace()
- self._write_bb_config([recipe_name], extra_packages=['lldb-server'])
+ self._write_bb_config()
+ # Build image with debug settings (lldb-server for clang) before starting QEMU
self._check_runqemu_prerequisites()
- bitbake(testimage)
+ tempdir = self._devtool_ide_sdk_recipe(recipe_name, build_file, testimage)
+ runCmd('devtool ide-sdk %s %s -c --ide=code' % (recipe_name, testimage),
+ output_log=self._cmd_logger)
+
with runqemu(testimage, runqemuparams="nographic") as qemu:
- tempdir = self._devtool_ide_sdk_recipe(recipe_name, build_file, testimage)
- bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --ide=code' % (
+ # Re-run with actual QEMU IP; image is already built
+ bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --skip-bitbake --ide=code' % (
recipe_name, testimage, qemu.ip)
runCmd(bitbake_sdk_cmd, output_log=self._cmd_logger)
@@ -4566,7 +4572,7 @@ class DevtoolIdeSdkClangTests(DevtoolIdeSdkTests):
testimage = "oe-selftest-image"
self._check_workspace()
- self._write_bb_config([recipe_name], extra_packages=['lldb-server'])
+ self._write_bb_config()
# Build image with debug settings (lldb-server for clang) before starting QEMU
self._check_runqemu_prerequisites()
@@ -4678,12 +4684,17 @@ class DevtoolIdeSdkClangTests(DevtoolIdeSdkTests):
testimage = 'oe-selftest-image'
self._check_workspace()
- self._write_bb_config([recipe_name], extra_packages=['lldb-server'])
+ self._write_bb_config()
self._check_runqemu_prerequisites()
- bitbake(testimage)
+
+ # Build image with debug settings (lldb-server for clang) before starting QEMU
+ tempdir = self._devtool_ide_sdk_recipe(recipe_name, build_file, testimage)
+ runCmd('devtool ide-sdk %s %s -c --ide=none' % (recipe_name, testimage),
+ output_log=self._cmd_logger)
+
with runqemu(testimage, runqemuparams='nographic') as qemu:
- tempdir = self._devtool_ide_sdk_recipe(recipe_name, build_file, testimage)
- bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --ide=none' % (
+ # Re-run with actual QEMU IP; image is already built
+ bitbake_sdk_cmd = 'devtool ide-sdk %s %s -t root@%s -c --skip-bitbake --ide=none' % (
recipe_name, testimage, qemu.ip)
runCmd(bitbake_sdk_cmd, output_log=self._cmd_logger)
@@ -4742,7 +4753,7 @@ class DevtoolIdeSdkClangTests(DevtoolIdeSdkTests):
testimage = 'oe-selftest-image'
self._check_workspace()
- self._write_bb_config([recipe_name], extra_packages=['lldb-server'])
+ self._write_bb_config()
self._check_runqemu_prerequisites()
# Build image with debug settings (lldb-server for clang) before starting QEMU
@@ -4803,7 +4814,7 @@ class DevtoolIdeSdkMiscTests(DevtoolIdeSdkTests):
shared_recipe_name = "cmake-example"
self._check_workspace()
- self._write_bb_config([modified_recipe_name])
+ self._write_bb_config()
tempdir = self._devtool_ide_sdk_recipe(
modified_recipe_name, modified_build_file, None)
--
2.55.0
next prev parent reply other threads:[~2026-08-30 21:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 21:48 [PATCH v2 00/25] devtool: ide-sdk: NFS/slirp support, deploy filtering, and robustness fixes AdrianF
2026-08-30 21:48 ` [PATCH v2 01/25] runqemu-extract-sdk: set PSEUDO_INCLUDE_PATHS for the extraction AdrianF
2026-08-30 21:48 ` [PATCH v2 02/25] devtool: ide-sdk: dedupe solib_search_path entries AdrianF
2026-09-03 11:18 ` [OE-core] " Richard Purdie
2026-09-03 16:06 ` Freihofer, Adrian
2026-09-03 20:21 ` Richard Purdie
2026-08-30 21:48 ` [PATCH v2 03/25] devtool: ide-sdk: VSCode IntelliSense for rootfs-dbg sources AdrianF
2026-08-30 21:48 ` [PATCH v2 04/25] cpp-example: fix stuck breakpoints when attaching and daemonize properly AdrianF
2026-08-30 21:48 ` [PATCH v2 05/25] devtool: ide-sdk: auto-write image debug settings to bbappend AdrianF
2026-08-30 21:48 ` AdrianF [this message]
2026-08-30 21:48 ` [PATCH v2 07/25] oeqa: QemuTarget: set use_slirp when slirp is in runqemuparams AdrianF
2026-08-30 21:48 ` [PATCH v2 08/25] devtool: ide-sdk: support runqemu slirp AdrianF
2026-08-30 21:48 ` [PATCH v2 09/25] devtool: ide-sdk: auto-disable ssh host key checking for loopback targets AdrianF
2026-08-30 21:48 ` [PATCH v2 10/25] oe-selftest: devtool ide-sdk: add slirp networking test AdrianF
2026-08-30 21:48 ` [PATCH v2 11/25] devtool: deploy-target: add --package/--file-glob filters AdrianF
2026-08-30 22:11 ` Patchtest results for " patchtest
2026-08-30 21:48 ` [PATCH v2 12/25] oe-selftest: devtool deploy-target: test " AdrianF
2026-08-30 21:48 ` [PATCH v2 13/25] devtool: ide-sdk: forward --package/--file-glob deploy filters AdrianF
2026-08-30 21:48 ` [PATCH v2 14/25] oe-selftest: devtool ide-sdk: cover --package filters AdrianF
2026-08-30 21:48 ` [PATCH v2 15/25] runqemu-extract-sdk: refactor in Python AdrianF
2026-09-03 11:36 ` [OE-core] " Richard Purdie
2026-08-30 21:48 ` [PATCH v2 16/25] runqemu-export-rootfs: " AdrianF
2026-08-30 21:48 ` [PATCH v2 17/25] devtool: deploy: split ssh deployment into a separate function AdrianF
2026-08-30 21:48 ` [PATCH v2 18/25] devtool: deploy-target: allow deploying directly into a local rootfs AdrianF
2026-08-30 21:48 ` [PATCH v2 19/25] oe-selftest: devtool deploy-target: test deploying into a local rootfs path AdrianF
2026-08-30 21:48 ` [PATCH v2 20/25] oe-selftest: tinfoil: test prepared task runner AdrianF
2026-08-30 21:48 ` [PATCH v2 21/25] devtool: ide-sdk: run do_install through BitBake AdrianF
2026-08-30 21:48 ` [PATCH v2 22/25] oe-selftest: devtool ide-sdk: test install task AdrianF
2026-08-30 21:48 ` [PATCH v2 23/25] devtool: ide-sdk: support NFS rootfs AdrianF
2026-08-30 21:48 ` [PATCH v2 24/25] oe-selftest: devtool ide-sdk: test NFS debug rootfs AdrianF
2026-08-30 21:48 ` [PATCH v2 25/25] devtool: ide-sdk: fix GDB loading stale libs instead of recipe's own build AdrianF
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260830214912.1346063-7-adrian.freihofer@siemens.com \
--to=adrian.freihofer@siemens.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.