Test for SVNPath element in Update.xml
The commit "Submit Subversion directory path in Update.xml" added the element <SVNPath>...</SVNPath> to Update.xml for Subversion work trees. This commit teaches the CTest.UpdateSVN test to verify the presence of the element.
This commit is contained in:
parent
a4cdd73636
commit
918355632c
|
@ -46,8 +46,9 @@ function(check_updates build)
|
|||
endforeach(f)
|
||||
|
||||
if(NOT UPDATE_NOT_GLOBAL)
|
||||
set(rev_elements "Revision|PriorRevision")
|
||||
set(rev_regex "^\t<(${rev_elements})>[^<\n]+</(${rev_elements})>$")
|
||||
set(rev_elements Revision PriorRevision ${UPDATE_GLOBAL_ELEMENTS})
|
||||
string(REPLACE ";" "|" rev_regex "${rev_elements}")
|
||||
set(rev_regex "^\t<(${rev_regex})>[^<\n]+</(${rev_regex})>$")
|
||||
file(STRINGS ${TOP}/${UPDATE_XML_FILE} UPDATE_XML_REVISIONS
|
||||
REGEX "${rev_regex}"
|
||||
LIMIT_INPUT 4096
|
||||
|
@ -56,7 +57,6 @@ function(check_updates build)
|
|||
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")
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
# Test in a directory next to this script.
|
||||
get_filename_component(TOP "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
set(TOP "${TOP}/@CTestUpdateSVN_DIR@")
|
||||
set(UPDATE_GLOBAL_ELEMENTS SVNPath)
|
||||
|
||||
# Include code common to all update tests.
|
||||
include("@CMAKE_CURRENT_SOURCE_DIR@/CTestUpdateCommon.cmake")
|
||||
|
|
Loading…
Reference in New Issue