From 79fcecfbcb81e2f2bb6a56998f5d9d872bb7d016 Mon Sep 17 00:00:00 2001 From: Daniel Brondani Date: Mon, 26 May 2025 09:45:07 +0200 Subject: [PATCH] [cbuild-run] Use case insensitive for debug adapters search --- tools/projmgr/src/ProjMgrRunDebug.cpp | 10 +++++++--- .../test/data/TestRunDebug/run-debug.csolution.yml | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/projmgr/src/ProjMgrRunDebug.cpp b/tools/projmgr/src/ProjMgrRunDebug.cpp index 09b22529b..4ffeec34f 100644 --- a/tools/projmgr/src/ProjMgrRunDebug.cpp +++ b/tools/projmgr/src/ProjMgrRunDebug.cpp @@ -620,9 +620,13 @@ const string ProjMgrRunDebug::GetAccessAttributes(const RteItem* mem) bool ProjMgrRunDebug::GetDebugAdapter(const string& name, const DebugAdaptersItem& adapters, DebugAdapterItem& match) { for (const auto& adapter : adapters) { - if (name == adapter.name || find(adapter.alias.begin(), adapter.alias.end(), name) != adapter.alias.end()) { - match = adapter; - return true; + auto aliases = adapter.alias; + aliases.push_back(adapter.name); + for (const auto& alias : aliases) { + if (RteUtils::EqualNoCase(name, alias)) { + match = adapter; + return true; + } } } return false; diff --git a/tools/projmgr/test/data/TestRunDebug/run-debug.csolution.yml b/tools/projmgr/test/data/TestRunDebug/run-debug.csolution.yml index ea1da578e..36b564bb8 100644 --- a/tools/projmgr/test/data/TestRunDebug/run-debug.csolution.yml +++ b/tools/projmgr/test/data/TestRunDebug/run-debug.csolution.yml @@ -18,7 +18,7 @@ solution: - set: info: Info target-set debugger: - name: ST-LINK + name: ST-Link protocol: jtag clock: 20000000 dbgconf: RTE/Device/RteTest1/RteTest1.dbgconf