Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/rtemodel/src/RteTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2063,7 +2063,7 @@ bool RteTarget::GenerateRteHeaderFile(const string& headerName, const string& co
// file does not exist or its content is different
if (RteFsUtils::CopyBufferToFile(headerFile, oss.str(), false) // write file
&& !GetProject()->ShouldUpdateRte() && !bRegionsHeader) {
callback->OutputMessage("Constructed file " + headerFile + " was recreated");
callback->OutputInfoMessage("Constructed file " + headerFile + " was recreated");
}
return true;
}
Expand Down
30 changes: 26 additions & 4 deletions tools/projmgr/include/ProjMgrCallback.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Arm Limited. All rights reserved.
* Copyright (c) 2020-2025 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -33,13 +33,21 @@ class ProjMgrCallback : public RteCallback {
}

/**
* @brief obtain warning messages
* @return list of all warning messages
*/
* @brief obtain warning messages
* @return list of all warning messages
*/
const std::list<std::string>& GetWarningMessages() const {
return m_warningMessages;
}

/**
* @brief obtain info messages
* @return list of all info messages
*/
const std::list<std::string>& GetInfoMessages() const {
return m_infoMessages;
}

/**
* @brief clear all error messages
*/
Expand All @@ -54,6 +62,13 @@ class ProjMgrCallback : public RteCallback {
m_warningMessages.clear();
}

/**
* @brief clear all info messages
*/
void ClearInfoMessages() {
m_infoMessages.clear();
}

/**
* @brief clear all output messages
*/
Expand All @@ -71,6 +86,12 @@ class ProjMgrCallback : public RteCallback {
*/
void OutputMessage(const std::string& message) override;

/**
* @brief output specified info message
* @param message string to output specified info message
*/
void OutputInfoMessage(const std::string& message) override;

/**
* @brief create error message string and add it to message list
* @param id error Id
Expand All @@ -82,6 +103,7 @@ class ProjMgrCallback : public RteCallback {
protected:
std::list<std::string> m_errorMessages;
std::list<std::string> m_warningMessages;
std::list<std::string> m_infoMessages;

};
#endif // PROJMGRCALLBACK_H
9 changes: 8 additions & 1 deletion tools/projmgr/src/ProjMgrCallback.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Arm Limited. All rights reserved.
* Copyright (c) 2020-2025 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -49,4 +49,11 @@ void ProjMgrCallback::OutputMessage(const string& message)
}
}

void ProjMgrCallback::OutputInfoMessage(const string& message)
{
if (!message.empty()) {
m_infoMessages.push_back(message);
}
}

// end of ProjMgrCallback.cpp
9 changes: 9 additions & 0 deletions tools/projmgr/src/ProjMgrWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,15 @@ std::vector<PackageItem> ProjMgrWorker::GetFilteredPacks(const PackageItem& pack

bool ProjMgrWorker::CheckRteErrors(void) {
const auto& callback = m_kernel->GetCallback();
const list<string>& rteInfoMessages = callback->GetInfoMessages();
if (!rteInfoMessages.empty()) {
string infoMsg = "RTE Model reports:";
for (const auto& rteInfoMessage : rteInfoMessages) {
infoMsg += "\n" + rteInfoMessage;
}
ProjMgrLogger::Get().Info(infoMsg);
callback->ClearInfoMessages();
}
const list<string>& rteWarningMessages = callback->GetWarningMessages();
if (!rteWarningMessages.empty()) {
string warnMsg = "RTE Model reports:";
Expand Down
2 changes: 1 addition & 1 deletion tools/projmgr/test/src/ProjMgrUnitTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3883,7 +3883,7 @@ TEST_F(ProjMgrUnitTests, RunProjMgr_NoUpdateRTEFiles) {
argv[7] = (char*)"--cbuildgen";
EXPECT_EQ(1, RunProjMgr(8, argv, m_envp));

EXPECT_NE(streamRedirect.GetErrorString().find("RTE/_TEST_TARGET/RTE_Components.h was recreated"), string::npos);
EXPECT_NE(streamRedirect.GetOutString().find("RTE/_TEST_TARGET/RTE_Components.h was recreated"), string::npos);

// Only constructed files are created in the RTE folder
GetFilesInTree(rteFolder, rteFiles);
Expand Down
Loading