forked from TriBITSPub/TriBITS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-extra repo support to TRIBITS_FILTER_OR_ASSERT_EXTRA_REPOS() …
…(SQUASH ME) (TriBITS TriBITSPub#73)
- Loading branch information
Roscoe A. Bartlett
committed
Jun 2, 2015
1 parent
991bca0
commit 59953b3
Showing
3 changed files
with
221 additions
and
62 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -269,6 +269,8 @@ FUNCTION(UNITTEST_TRIBITS_PROCESS_EXTRAREPOS_LISTS) | |
|
||
# ToDo: Test error when invalid VC type is given | ||
|
||
# ToDo: Test that all PRE repos come before all POST repos | ||
|
||
ENDFUNCTION() | ||
|
||
|
||
|
@@ -312,76 +314,234 @@ ENDFUNCTION() | |
|
||
FUNCTION(UNITTEST_TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS) | ||
|
||
SET(${PROJECT_NAME}_EXTRAREPOS_FILE "${CMAKE_CURRENT_LIST_DIR}/emptyFile.cmake") | ||
|
||
TRIBITS_PROJECT_DEFINE_EXTRA_REPOSITORIES( | ||
repo0_name "" GIT "[email protected]:repo0" PRE Continuous | ||
repo1_name "" SVN "[email protected]:repo1" PRE,HASPACKAGES Continuous | ||
repo2_name "some/sub/dir" SVN "[email protected]:repo2" NOPACKAGES Nightly | ||
repo3_name "" GIT "[email protected]:repo3" POST Nightly | ||
) | ||
|
||
MESSAGE("\n***") | ||
MESSAGE("*** Test TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS with empty ${PROJECT_NAME}_EXTRA_REPOSITORIES") | ||
MESSAGE("*** Test TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS() empty PRE_REPOSITORIES and EXTRA_REPOSITORIES ") | ||
MESSAGE("***\n") | ||
|
||
#SET(TRIBITS_PROCESS_EXTRAREPOS_LISTS_DEBUG TRUE) | ||
|
||
SET(${PROJECT_NAME}_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE Nightly) | ||
SET(${PROJECT_NAME}_EXTRAREPOS_FILE "${CMAKE_CURRENT_LIST_DIR}/emptyFile.cmake") | ||
|
||
TRIBITS_PROJECT_DEFINE_EXTRA_REPOSITORIES( | ||
repo0_name "" GIT "[email protected]:repo0" "" Continuous | ||
repo1_name "some/sub/dir" SVN "[email protected]:repo1" NOPACKAGES Nightly | ||
) | ||
SET(${PROJECT_NAME}_PRE_REPOSITORIES "") | ||
SET(${PROJECT_NAME}_EXTRA_REPOSITORIES "") | ||
|
||
TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS() | ||
|
||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES_DEFAULT | ||
"repo0_name;repo1_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES_DEFAULT | ||
"repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DEFAULT | ||
"repo0_name;repo1_name;repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES | ||
"repo0_name;repo1_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES | ||
"repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES | ||
"repo0_name;repo1_name;repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DIRS | ||
"repo0_name;some/sub/dir") | ||
"repo0_name;repo1_name;some/sub/dir;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_VCTYPES | ||
"GIT;SVN") | ||
"GIT;SVN;SVN;GIT") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_REPOURLS | ||
"[email protected]:repo0;[email protected]:repo1") | ||
"[email protected]:repo0;[email protected]:repo1;[email protected]:repo2;[email protected]:repo3") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_HASPKGS | ||
"HASPACKAGES;NOPACKAGES") | ||
"HASPACKAGES;HASPACKAGES;NOPACKAGES;HASPACKAGES") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_PREPOSTS | ||
"POST;POST") | ||
"PRE;PRE;POST;POST") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_CATEGORIES | ||
"Continuous;Nightly") | ||
"Continuous;Continuous;Nightly;Nightly") | ||
|
||
MESSAGE("\n***") | ||
MESSAGE("*** Test TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS(), EXTRA_REPOSITORIES=repo2_name") | ||
MESSAGE("***\n") | ||
|
||
#SET(TRIBITS_PROCESS_EXTRAREPOS_LISTS_DEBUG TRUE) | ||
|
||
SET(${PROJECT_NAME}_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE Nightly) | ||
SET(${PROJECT_NAME}_PRE_REPOSITORIES "") | ||
SET(${PROJECT_NAME}_EXTRA_REPOSITORIES repo2_name) | ||
|
||
TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS() | ||
|
||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES_DEFAULT | ||
"") | ||
"repo0_name;repo1_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES_DEFAULT | ||
"repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DEFAULT | ||
"repo0_name;repo1_name;repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES | ||
"repo0_name;repo1_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES | ||
"repo2_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES | ||
"repo0_name;repo1_name;repo2_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DIRS | ||
"repo0_name;repo1_name;some/sub/dir") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_VCTYPES | ||
"GIT;SVN;SVN") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_REPOURLS | ||
"[email protected]:repo0;[email protected]:repo1;[email protected]:repo2") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_HASPKGS | ||
"HASPACKAGES;HASPACKAGES;NOPACKAGES") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_PREPOSTS | ||
"PRE;PRE;POST") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_CATEGORIES | ||
"Continuous;Continuous;Nightly") | ||
|
||
MESSAGE("\n***") | ||
MESSAGE("*** Test TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS with non-empty ${PROJECT_NAME}_EXTRA_REPOSITORIES") | ||
MESSAGE("*** Test TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS(), EXTRA_REPOSITORIES=repo3_name") | ||
MESSAGE("***\n") | ||
|
||
#SET(TRIBITS_PROCESS_EXTRAREPOS_LISTS_DEBUG TRUE) | ||
|
||
SET(${PROJECT_NAME}_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE Nightly) | ||
SET(${PROJECT_NAME}_EXTRAREPOS_FILE "${CMAKE_CURRENT_LIST_DIR}/emptyFile.cmake") | ||
SET(${PROJECT_NAME}_EXTRA_REPOSITORIES repo0_name) | ||
|
||
TRIBITS_PROJECT_DEFINE_EXTRA_REPOSITORIES( | ||
repo0_name "" GIT "[email protected]:repo0" "" Continuous | ||
repo1_name "some/sub/dir" SVN "[email protected]:repo1" NOPACKAGES Nightly | ||
) | ||
SET(${PROJECT_NAME}_PRE_REPOSITORIES "") | ||
SET(${PROJECT_NAME}_EXTRA_REPOSITORIES repo3_name) | ||
|
||
TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS() | ||
|
||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES_DEFAULT | ||
"") | ||
"repo0_name;repo1_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES_DEFAULT | ||
"repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DEFAULT | ||
"repo0_name;repo1_name;repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES | ||
"repo0_name;repo1_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES | ||
"repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES | ||
"repo0_name;repo1_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DIRS | ||
"repo0_name;repo1_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_VCTYPES | ||
"GIT;SVN;GIT") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_REPOURLS | ||
"[email protected]:repo0;[email protected]:repo1;[email protected]:repo3") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_HASPKGS | ||
"HASPACKAGES;HASPACKAGES;HASPACKAGES") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_PREPOSTS | ||
"PRE;PRE;POST") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_CATEGORIES | ||
"Continuous;Continuous;Nightly") | ||
|
||
MESSAGE("\n***") | ||
MESSAGE("*** Test TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS(), PRE_REPOSITORIES=repo0_name") | ||
MESSAGE("***\n") | ||
|
||
#SET(TRIBITS_PROCESS_EXTRAREPOS_LISTS_DEBUG TRUE) | ||
|
||
SET(${PROJECT_NAME}_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE Nightly) | ||
SET(${PROJECT_NAME}_PRE_REPOSITORIES repo0_name) | ||
SET(${PROJECT_NAME}_EXTRA_REPOSITORIES "") | ||
|
||
TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS() | ||
|
||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES_DEFAULT | ||
"repo0_name;repo1_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES_DEFAULT | ||
"repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DEFAULT | ||
"repo0_name;repo1_name;repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES | ||
"repo0_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES | ||
"repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES | ||
"repo0_name;repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DIRS | ||
"repo0_name;some/sub/dir;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_VCTYPES | ||
"GIT;SVN;GIT") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_REPOURLS | ||
"[email protected]:repo0;[email protected]:repo2;[email protected]:repo3") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_HASPKGS | ||
"HASPACKAGES;NOPACKAGES;HASPACKAGES") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_PREPOSTS | ||
"PRE;POST;POST") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_CATEGORIES | ||
"Continuous;Nightly;Nightly") | ||
|
||
MESSAGE("\n***") | ||
MESSAGE("*** Test TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS(), PRE_REPOSITORIES=repo1_name") | ||
MESSAGE("***\n") | ||
|
||
#SET(TRIBITS_PROCESS_EXTRAREPOS_LISTS_DEBUG TRUE) | ||
|
||
SET(${PROJECT_NAME}_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE Nightly) | ||
SET(${PROJECT_NAME}_PRE_REPOSITORIES repo1_name) | ||
SET(${PROJECT_NAME}_EXTRA_REPOSITORIES "") | ||
|
||
TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS() | ||
|
||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES_DEFAULT | ||
"repo0_name;repo1_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES_DEFAULT | ||
"repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DEFAULT | ||
"repo0_name;repo1_name;repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES | ||
"repo1_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES | ||
"repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES | ||
"repo1_name;repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DIRS | ||
"repo1_name;some/sub/dir;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_VCTYPES | ||
"SVN;SVN;GIT") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_REPOURLS | ||
"[email protected]:repo1;[email protected]:repo2;[email protected]:repo3") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_HASPKGS | ||
"HASPACKAGES;NOPACKAGES;HASPACKAGES") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_PREPOSTS | ||
"PRE;POST;POST") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_CATEGORIES | ||
"Continuous;Nightly;Nightly") | ||
|
||
MESSAGE("\n***") | ||
MESSAGE("*** Test TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS(), PRE_REPOSITORIES=repo0_name, EXTRA_REPOSITORIES=repo3_name") | ||
MESSAGE("***\n") | ||
|
||
SET(${PROJECT_NAME}_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE Nightly) | ||
SET(${PROJECT_NAME}_PRE_REPOSITORIES repo0_name) | ||
SET(${PROJECT_NAME}_EXTRA_REPOSITORIES repo3_name) | ||
|
||
TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS() | ||
|
||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES_DEFAULT | ||
"repo0_name;repo1_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES_DEFAULT | ||
"repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DEFAULT | ||
"repo0_name;repo1_name;repo2_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PRE_REPOSITORIES | ||
"repo0_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_EXTRA_REPOSITORIES | ||
"repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES | ||
"repo0_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DIRS | ||
"repo0_name;repo3_name") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_VCTYPES | ||
"GIT") | ||
"GIT;GIT") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_REPOURLS | ||
"[email protected]:repo0") | ||
"[email protected]:repo0;[email protected]:repo3") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_HASPKGS | ||
"HASPACKAGES") | ||
"HASPACKAGES;HASPACKAGES") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_PREPOSTS | ||
"POST") | ||
"PRE;POST") | ||
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_CATEGORIES | ||
"Continuous") | ||
"Continuous;Nightly") | ||
|
||
ENDFUNCTION() | ||
|
||
|
@@ -409,4 +569,4 @@ UNITTEST_TRIBITS_PROCESS_EXTRAREPOS_LISTS_OLD_REPOTYPE() | |
UNITTEST_TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS() | ||
|
||
# Pass in the number of expected tests that must pass! | ||
UNITTEST_FINAL_RESULT(88) | ||
UNITTEST_FINAL_RESULT(142) |
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