Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[projmgr] error msg on list layers #1647

Merged
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
4 changes: 4 additions & 0 deletions tools/projmgr/src/ProjMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,10 @@ bool ProjMgr::RunListLayers(void) {
// Step3: Detect layers and list them
vector<string> layers;
error = !m_worker.ListLayers(layers, m_clayerSearchPath, m_failedContext);
if (error) {
ProjMgrLogger::Error("error occurred during layer detection. Please review the project and its dependencies");
}

// If the worker has toolchain errors, set the error flag
if (m_worker.HasToolchainErrors()) {
error = true;
Expand Down
8 changes: 6 additions & 2 deletions tools/projmgr/test/src/ProjMgrUnitTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1991,6 +1991,8 @@ connections are invalid\n\
\n\
no valid combination of clayers was found\n\
\n\
error csolution: error occurred during layer detection. Please review the project and its dependencies\
\n\
";

const string& errStr = streamRedirect.GetErrorString();
Expand Down Expand Up @@ -2121,7 +2123,8 @@ check combined connections:\
EXPECT_EQ(1, RunProjMgr(8, argv, m_envp));

errStr = streamRedirect.GetErrorString();
EXPECT_TRUE(regex_match(errStr, regex(".*invalid/clayer/path - error csolution: clayer search path does not exist\n")));
string expectedStr = ".*invalid/clayer/path - error csolution: clayer search path does not exist\nerror csolution: error occurred during layer detection. Please review the project and its dependencies\n";
EXPECT_TRUE(regex_match(errStr, regex(expectedStr)));
}

TEST_F(ProjMgrUnitTests, LayerVariables) {
Expand Down Expand Up @@ -2198,7 +2201,8 @@ no valid combination of clayers was found.*\
streamRedirect.ClearStringStreams();
expectedErrStr = ".*\
error csolution: undefined variables in variables-notdefined.csolution.yml:.*\
- \\$NotDefined\\$";
- \\$NotDefined\\$\
error csolution: error occurred during layer detection. Please review the project and its dependencies";

argv[7] = (char*)"-q";
EXPECT_EQ(1, RunProjMgr(8, argv, m_envp));
Expand Down
Loading