From patchwork Mon Nov 9 13:44:35 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enguerrand de Ribaucourt X-Patchwork-Id: 103514 Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.6199.1794231925343675182 for ; Mon, 09 Nov 2026 05:45:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=iLcqSrbI; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: enguerrand.de-ribaucourt@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 72E153D8176B; Mon, 9 Nov 2026 08:45:24 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id Jwh8AzjLB_Gb; Mon, 9 Nov 2026 08:45:23 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 682C63D81838; Mon, 9 Nov 2026 08:45:23 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 682C63D81838 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1794231923; bh=fUw/aP++f+syKwl+31QMkC9oA3gcNdnoeXcEna27yzA=; h=From:Date:MIME-Version:Message-Id:To; b=iLcqSrbIZJWk966P/Z4IVNZ8fU4ewlkxSWWqq11LbfQgr7u6Wd4JRcxpmQ8P4U930 UjcKwcAhdAZXvFTARbN8p24Tr27rwsC0Jr4J26HYm9177j14pVznISCA8SG+OFRwdS lCvHFtLvK1Xn+cFgj5o4XbIeg4wo1jTKsH7Dq/smcdHNZBErI8mDLKYl0EjhTv4cn4 MZ+HeDQzTl7wHqLNLAvHnPP+GUSsWGMcy6Soy87yvJ0iNwgRQXGfX0OzWGBTZFUZCZ 9WbgN89e3ohJAbQIppWaxfeR4I8jHvlDct3Y6s7QY2VzOzLmVaVTaWqZHHCIR4/qGH ZYMf+YI1BhlnQ== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id VajSjwILUvRF; Mon, 9 Nov 2026 08:45:23 -0500 (EST) Received: from isabelle.rennes.sfl (80-15-101-118.ftth.fr.orangecustomers.net [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id AE2503D81892; Mon, 9 Nov 2026 08:45:22 -0500 (EST) From: Enguerrand de Ribaucourt Date: Mon, 09 Nov 2026 14:44:35 +0100 Subject: [PATCH v2 18/18] oeqa/selftest: verify Cargo rebuild and redeploy MIME-Version: 1.0 Message-Id: <20261109-devtool-ide-sdk-cargo-v2-18-d56134000561@savoirfairelinux.com> References: <20261109-devtool-ide-sdk-cargo-v2-0-d56134000561@savoirfairelinux.com> In-Reply-To: <20261109-devtool-ide-sdk-cargo-v2-0-d56134000561@savoirfairelinux.com> To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Enguerrand de Ribaucourt X-Mailer: b4 0.16.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Mon, 09 Nov 2026 13:45:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/249845 After a source edit, run the ordered Cargo build/install/deploy tasks and verify the changed Fibonacci result. Use a helper to shift source lines so the breakpoint location can change without hard-coded line numbers; reuse the shared LLDB runner for both debug sessions. AI-Generated: Uses GitHub Copilot Signed-off-by: Enguerrand de Ribaucourt --- meta/lib/oeqa/selftest/cases/devtool.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 0128d37d83..c54f13de5a 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -3147,6 +3147,15 @@ class DevtoolIdeSdkTests(DevtoolBase): return lineno self.fail("Could not find marker %r in %s" % (marker, source_path)) + def _insert_source_line_shift(self, source_path, marker, line_count): + with open(source_path) as source_handle: + source = source_handle.read() + self.assertEqual(source.count(marker), 1) + inserted_lines = ''.join( + ' // line shift %d\n' % index for index in range(line_count)) + with open(source_path, 'w') as source_handle: + source_handle.write(source.replace(marker, inserted_lines + marker, 1)) + def _find_multi_script_port(self, recipe_name, script_prefix, example_exe): """Discover the port assigned to a generated 'multi' mode debug-server script (gdbserver_*/lldb_server_*), since each --ide plugin allocates @@ -4485,6 +4494,28 @@ class DevtoolIdeSdkRustTests(DevtoolIdeSdkTests): self.assertIsNotNone(qemu.port, 'No SSH port for the slirp target') self._verify_rust_lldb_debugging(tempdir, expected_input=4) + main_rs = os.path.join(tempdir, 'src', 'main.rs') + self._insert_source_line_shift(main_rs, ' match n {', 4) + with open(main_rs) as source_file: + shifted_source = source_file.read() + self.assertEqual(shifted_source.count('fibonacci(4)'), 1) + with open(main_rs, 'w') as source_file: + source_file.write( + shifted_source.replace('fibonacci(4)', 'fibonacci(5)', 1)) + + with open(os.path.join(tempdir, '.vscode', 'tasks.json')) as tasks_file: + tasks = json.load(tasks_file)['tasks'] + install_task = next( + task for task in tasks + if task['label'].startswith('install && deploy-target ')) + task_results = self._run_vscode_task_with_dependencies( + tempdir, install_task['label']) + self.assertTrue( + any('Compiling cargo-example' in result.output + for result in task_results), + 'Cargo build task did not recompile the modified Rust source') + self._verify_rust_lldb_debugging(tempdir, expected_input=5) + def _verify_rust_lldb_debugging(self, tempdir, expected_input): with open(os.path.join(tempdir, '.vscode', 'launch.json')) as launch_file: launch = json.load(launch_file)['configurations'][0]