summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-07-29 14:24:06 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-07-29 14:24:06 (GMT)
commit0375865a4e1ab337ae5ac2e8eae888444da00864 (patch)
tree2f798d44e31bbb9169d7fa36dce05352ad664bc5 /Tests
parentb6fb213ed1431321fab0705beb3aae82f451dcc8 (diff)
downloadCMake-0375865a4e1ab337ae5ac2e8eae888444da00864.zip
CMake-0375865a4e1ab337ae5ac2e8eae888444da00864.tar.gz
CMake-0375865a4e1ab337ae5ac2e8eae888444da00864.tar.bz2
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')
-rw-r--r--Tests/CTestUpdateCommon.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index a52cb14..335d09e 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)