summaryrefslogtreecommitdiff
path: root/Tests/CTestUpdateCommon.cmake
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-07-29 10:24:06 -0400
committerDavid Cole <david.cole@kitware.com>2011-07-29 10:24:06 -0400
commit0375865a4e1ab337ae5ac2e8eae888444da00864 (patch)
tree2f798d44e31bbb9169d7fa36dce05352ad664bc5 /Tests/CTestUpdateCommon.cmake
parentb6fb213ed1431321fab0705beb3aae82f451dcc8 (diff)
downloadcmake-0375865a4e1ab337ae5ac2e8eae888444da00864.tar.gz
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.
Diffstat (limited to 'Tests/CTestUpdateCommon.cmake')
-rw-r--r--Tests/CTestUpdateCommon.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index a52cb148d2..335d09e7e3 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -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)