Fix machine-specific UpdateGIT test failures

Generated Update.xml file is larger than the previously
hard-coded limit of 4096. Introduce variable max_update_xml_size
and bump it up to 16k for reliable test runs.
This commit is contained in:
David Cole 2011-07-29 10:24:06 -04:00
parent b6fb213ed1
commit 0375865a4e
1 changed files with 5 additions and 3 deletions

View File

@ -29,11 +29,13 @@ function(check_updates build)
endif(NOT UPDATE_XML_FILE)
message(" found ${UPDATE_XML_FILE}")
set(max_update_xml_size 16384)
# Read entries from the Update.xml file
set(types "Updated|Modified|Conflicting")
file(STRINGS ${TOP}/${UPDATE_XML_FILE} UPDATE_XML_ENTRIES
REGEX "<(${types}|FullName)>"
LIMIT_INPUT 4096
LIMIT_INPUT ${max_update_xml_size}
)
string(REGEX REPLACE
"[ \t]*<(${types})>[ \t]*;[ \t]*<FullName>([^<]*)</FullName>"
@ -51,7 +53,7 @@ function(check_updates build)
set(rev_regex "^\t<(${rev_regex})>[^<\n]+</(${rev_regex})>$")
file(STRINGS ${TOP}/${UPDATE_XML_FILE} UPDATE_XML_REVISIONS
REGEX "${rev_regex}"
LIMIT_INPUT 4096
LIMIT_INPUT ${max_update_xml_size}
)
foreach(r IN LISTS UPDATE_XML_REVISIONS)
string(REGEX REPLACE "${rev_regex}" "\\1" element "${r}")
@ -94,7 +96,7 @@ function(check_updates build)
file(GLOB UPDATE_LOG_FILE
${TOP}/${build}/Testing/Temporary/LastUpdate*.log)
if(UPDATE_LOG_FILE)
file(READ ${UPDATE_LOG_FILE} UPDATE_LOG LIMIT 4096)
file(READ ${UPDATE_LOG_FILE} UPDATE_LOG LIMIT ${max_update_xml_size})
string(REGEX REPLACE "\n" "\n " UPDATE_LOG "${UPDATE_LOG}")
set(MSG "${MSG}Update log:\n ${UPDATE_LOG}")
else(UPDATE_LOG_FILE)