[projmgr] make Info message under verbose and update affected unit tests#2406
[projmgr] make Info message under verbose and update affected unit tests#2406brondani merged 8 commits intoOpen-CMSIS-Pack:mainfrom
verbose and update affected unit tests#2406Conversation
There was a problem hiding this comment.
Pull request overview
This PR changes projmgr logging behavior so Info messages are only emitted to stdout when --verbose is enabled, and updates unit tests / reference outputs accordingly.
Changes:
- Add a global verbose flag to
ProjMgrLoggerand gateInfo()console output behindIsVerbose(). - Propagate CLI
--verbosestate intoProjMgrLoggerduring command-line parsing. - Update affected unit tests and layer index reference YAMLs to include/expect info output only under verbose.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/projmgr/src/ProjMgrLogger.cpp | Gate Info() printing behind verbose mode; add m_verbose definition. |
| tools/projmgr/include/ProjMgrLogger.h | Expose IsVerbose() and new m_verbose flag. |
| tools/projmgr/src/ProjMgr.cpp | Propagate parsed --verbose into ProjMgrLogger::m_verbose. |
| tools/projmgr/test/src/ProjMgrUnitTests.cpp | Update logger/CLI tests to reflect info output requiring verbose. |
| tools/projmgr/test/src/ProjMgrWorkerUnitTests.cpp | Ensure verbose is enabled where info output is asserted and reset afterward. |
| tools/projmgr/test/src/ProjMgrGeneratorUnitTests.cpp | Add --verbose to runs that rely on info output. |
| tools/projmgr/test/data/TestLayers/ref/select.cbuild-idx.yml | Update reference cbuild-idx to include generated info messages. |
| tools/projmgr/test/data/TestLayers/ref/no_compiler.cbuild-idx.yml | Update reference cbuild-idx to include generated info messages. |
| tools/projmgr/test/data/TestLayers/ref/config.cbuild-idx.yml | Update reference cbuild-idx to include generated info messages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 3 files 21 suites 17m 15s ⏱️ Results for commit 8023798. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull request overview
Updates projmgr/csolution logging so that info messages are only printed when --verbose is enabled, and adjusts unit tests / reference outputs accordingly.
Changes:
- Introduce a
ProjMgrLoggerverbose flag and gateInfo()console output on it. - Wire CLI
--verboseparsing toProjMgrLoggerso runtime behavior matches the new logging policy. - Update unit tests and reference
.cbuild-idx.ymlfixtures to account for the changedinfovisibility/output.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/projmgr/src/ProjMgrLogger.cpp | Adds m_verbose and prints info only when --verbose is enabled. |
| tools/projmgr/include/ProjMgrLogger.h | Declares m_verbose and IsVerbose() accessor. |
| tools/projmgr/src/ProjMgr.cpp | Propagates CLI --verbose state into ProjMgrLogger::m_verbose. |
| tools/projmgr/test/src/ProjMgrWorkerUnitTests.cpp | Enables m_verbose for a test that asserts info output, then resets it. |
| tools/projmgr/test/src/ProjMgrUnitTests.cpp | Refactors logger validation expectations and adds --verbose to tests that require info output. |
| tools/projmgr/test/src/ProjMgrGeneratorUnitTests.cpp | Adds --verbose to generator dry-run tests to keep expected stdout behavior consistent. |
| tools/projmgr/test/data/TestLayers/ref/select.cbuild-idx.yml | Updates reference output to include stored info messages in generated idx content. |
| tools/projmgr/test/data/TestLayers/ref/no_compiler.cbuild-idx.yml | Updates reference output to include stored info messages in generated idx content. |
| tools/projmgr/test/data/TestLayers/ref/config.cbuild-idx.yml | Updates reference output to include stored info messages in generated idx content. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2406 +/- ##
=======================================
Coverage 64.69% 64.70%
=======================================
Files 145 145
Lines 26122 26127 +5
Branches 15765 15767 +2
=======================================
+ Hits 16900 16905 +5
Misses 7068 7068
Partials 2154 2154
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
To address #1767 .
--verboseis enabled.ProjMgrUnitTests.Validate_Logger.quietandverboseare mutually exclusive.Update unit tests:
ref/*.cbuild-idx.ymlfiles, modification is required in those files as more info messages are generated after enabling--verbose.