-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[projmgr] Update load packs policy handling
- Loading branch information
1 parent
0d0c96c
commit 29c0da7
Showing
4 changed files
with
54 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,10 +83,16 @@ TEST_F(ProjMgrUnitTests, RunProjMgr_ListPacks) { | |
map<std::pair<string, string>, string> testInputs = { | ||
{{"TestSolution/test.csolution.yml", "test1.Debug+CM0"}, | ||
"ARM::[email protected] \\(.*\\)\n" }, | ||
// packs are specified only with vendor | ||
{{"TestSolution/test.csolution_filtered_pack_selection.yml", "test1.Debug+CM0"}, | ||
"ARM::[email protected] \\(.*\\)\nARM::[email protected] \\(.*\\)\nARM::[email protected] \\(.*\\)\nARM::[email protected] \\(.*\\)\n"}, | ||
// packs are specified with wildcards | ||
{{"TestSolution/test.csolution_filtered_pack_selection.yml", "test1.Release+CM0"}, | ||
"ARM::[email protected] \\(.*\\)\n"}, | ||
// packs are not specified | ||
{{"TestSolution/test.csolution_no_packs.yml", "test1.Debug+CM0"}, | ||
"ARM::[email protected] \\(.*\\)\nARM::[email protected] \\(.*\\)\nARM::[email protected] \\(.*\\)\nARM::[email protected] \\(.*\\)\n"}, | ||
// packs are fully specified | ||
{{"TestSolution/test.csolution_pack_selection.yml", "test2.Debug+CM0"}, | ||
"ARM::[email protected] \\(.*\\)\n"} | ||
}; | ||
|
@@ -213,6 +219,27 @@ ARM::[email protected] \\(.*\\)\n\ | |
EXPECT_TRUE(regex_match(outStr, regex(expectedAll))); | ||
} | ||
|
||
TEST_F(ProjMgrUnitTests, RunProjMgr_ListPacksAll) { | ||
char* argv[5]; | ||
StdStreamRedirect streamRedirect; | ||
argv[1] = (char*)"list"; | ||
argv[2] = (char*)"packs"; | ||
argv[3] = (char*)"-l"; | ||
argv[4] = (char*)"all"; | ||
EXPECT_EQ(0, RunProjMgr(5, argv, 0)); | ||
|
||
const string& expectedAll = "\ | ||
ARM::[email protected] \\(.*\\)\n\ | ||
ARM::[email protected] \\(.*\\)\n\ | ||
ARM::[email protected] \\(.*\\)\n\ | ||
ARM::[email protected] \\(.*\\)\n\ | ||
ARM::[email protected] \\(.*\\)\n\ | ||
"; | ||
|
||
auto outStr = streamRedirect.GetOutString(); | ||
EXPECT_TRUE(regex_match(outStr, regex(expectedAll))); | ||
} | ||
|
||
TEST_F(ProjMgrUnitTests, RunProjMgr_ListPacksMissing) { | ||
char* argv[8]; | ||
StdStreamRedirect streamRedirect; | ||
|