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 tools/projmgr/src/ProjMgrRpcServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ RpcArgs::SuccessResult RpcHandler::LoadSolution(const string& solution, const st
}

void RpcHandler::UpdateFilter(const string& context, RteTarget* rteTarget, bool all) {
if(m_bUseAllPacks == all) {
if(m_bUseAllPacks == all && rteTarget->GetPackageFilter().IsUseAllPacks() == all) {
return;
}
m_bUseAllPacks = all;
Expand Down
7 changes: 6 additions & 1 deletion tools/projmgr/test/src/ProjMgrRpcTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -623,23 +623,28 @@ TEST_F(ProjMgrRpcTests, RpcResolveComponents) {

TEST_F(ProjMgrRpcTests, RpcGetComponentsTree) {
string context = "selectable+CM0";
string context1 = "conflict+CM0";
vector<string> contextList = {
context
context,
context1
};
string csolution = "/Validation/dependencies.csolution.yml";
auto requests = CreateLoadRequests(csolution, "", contextList);
requests += FormatRequest(3, "GetComponentsTree", json({{ "context", context }, {"all", true}}));
requests += FormatRequest(4, "GetComponentsTree", json({{ "context", context }, {"all", false}}));
requests += FormatRequest(5, "LoadSolution", json({{ "solution", testinput_folder + csolution }, { "activeTarget", "" }}));
requests += FormatRequest(6, "GetComponentsTree", json({{ "context", context }, {"all", true}}));
requests += FormatRequest(7, "GetComponentsTree", json({{ "context", context1 }, {"all", true}}));

const auto& responses = RunRpcMethods(requests);

auto size3 = responses[2]["result"]["classes"].size();
auto size4 = responses[3]["result"]["classes"].size();
auto size6 = responses[5]["result"]["classes"].size();
auto size7 = responses[6]["result"]["classes"].size();
EXPECT_TRUE(size3 > size4); // there are more components in all packs that in packs listed in solution
EXPECT_EQ(size3, size6); // after solution reload, all components can be requested
EXPECT_EQ(size3, size7); // changing context respects all flag
}


Expand Down
Loading