summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CTestUpdateCVS.cmake.in1
-rw-r--r--Tests/CTestUpdateCommon.cmake19
2 files changed, 20 insertions, 0 deletions
diff --git a/Tests/CTestUpdateCVS.cmake.in b/Tests/CTestUpdateCVS.cmake.in
index 8ac0fa1..1509adf 100644
--- a/Tests/CTestUpdateCVS.cmake.in
+++ b/Tests/CTestUpdateCVS.cmake.in
@@ -5,6 +5,7 @@
# Test in a directory next to this script.
get_filename_component(TOP "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(TOP "${TOP}/@CTestUpdateCVS_DIR@")
+set(UPDATE_NOT_GLOBAL 1)
# Include code common to all update tests.
include("@CMAKE_CURRENT_SOURCE_DIR@/CTestUpdateCommon.cmake")
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index b680b8e..211a0fa 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -45,6 +45,25 @@ function(check_updates build)
endif()
endforeach(f)
+ if(NOT UPDATE_NOT_GLOBAL)
+ set(rev_elements "Revision|PriorRevision")
+ set(rev_regex "^\t<(${rev_elements})>[^<\n]+</(${rev_elements})>$")
+ file(STRINGS ${TOP}/${UPDATE_XML_FILE} UPDATE_XML_REVISIONS
+ REGEX "${rev_regex}"
+ LIMIT_INPUT 4096
+ )
+ foreach(r IN LISTS UPDATE_XML_REVISIONS)
+ string(REGEX REPLACE "${rev_regex}" "\\1" element "${r}")
+ set(element_${element} 1)
+ endforeach()
+ string(REPLACE "|" ";" rev_elements "${rev_elements}")
+ foreach(element ${rev_elements})
+ if(NOT element_${element})
+ list(APPEND MISSING "global <${element}> element")
+ endif()
+ endforeach()
+ endif()
+
# Report the result
if(MISSING)
# List the missing entries