Merge topic 'ctest-p4'

1b54b1d ctest_update: Do not remove the p4 depot name
This commit is contained in:
Brad King 2013-11-02 10:54:42 -04:00 committed by CMake Topic Stage
commit f61bbf1b90
3 changed files with 11 additions and 11 deletions

View File

@ -144,17 +144,7 @@ private:
if(!this->Line.empty() && this->Line[0] == '=' if(!this->Line.empty() && this->Line[0] == '='
&& this->RegexDiff.find(this->Line)) && this->RegexDiff.find(this->Line))
{ {
std::string Path = this->RegexDiff.match(1); CurrentPath = this->RegexDiff.match(1);
// See if we need to remove the //depot prefix
if(Path.length() > 2 && Path[0] == '/' && Path[1] == '/')
{
size_t found = Path.find('/', 2);
if(found != std::string::npos)
{
Path = Path.substr(found + 1);
}
}
CurrentPath = Path;
AlreadyNotified = false; AlreadyNotified = false;
} }
else else

View File

@ -37,10 +37,19 @@ function(check_updates build)
REGEX "<(${types}|FullName)>" REGEX "<(${types}|FullName)>"
LIMIT_INPUT ${max_update_xml_size} LIMIT_INPUT ${max_update_xml_size}
) )
string(REGEX REPLACE string(REGEX REPLACE
"[ \t]*<(${types})>[ \t]*;[ \t]*<FullName>([^<]*)</FullName>" "[ \t]*<(${types})>[ \t]*;[ \t]*<FullName>([^<]*)</FullName>"
"\\1{\\2}" UPDATE_XML_ENTRIES "${UPDATE_XML_ENTRIES}") "\\1{\\2}" UPDATE_XML_ENTRIES "${UPDATE_XML_ENTRIES}")
# If specified, remove the given prefix from the files in Update.xml.
# Some VCS systems, like Perforce, return absolute locations
if(DEFINED REPOSITORY_FILE_PREFIX)
string(REPLACE
"${REPOSITORY_FILE_PREFIX}" ""
UPDATE_XML_ENTRIES "${UPDATE_XML_ENTRIES}")
endif()
# Compare expected and actual entries # Compare expected and actual entries
set(EXTRA "${UPDATE_XML_ENTRIES}") set(EXTRA "${UPDATE_XML_ENTRIES}")
list(REMOVE_ITEM EXTRA ${ARGN} ${UPDATE_EXTRA} ${UPDATE_MAYBE}) list(REMOVE_ITEM EXTRA ${ARGN} ${UPDATE_EXTRA} ${UPDATE_MAYBE})

View File

@ -8,6 +8,7 @@ set(P4_TOP "${TOP}")
set(TOP "${TOP}/@CTestUpdateP4_DIR@") set(TOP "${TOP}/@CTestUpdateP4_DIR@")
# Include code common to all update tests. # Include code common to all update tests.
set(REPOSITORY_FILE_PREFIX "//ctest/")
include("@CMAKE_CURRENT_SOURCE_DIR@/CTestUpdateCommon.cmake") include("@CMAKE_CURRENT_SOURCE_DIR@/CTestUpdateCommon.cmake")
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------