summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ctest_update/UpdateChangeId-check.cmake
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2019-04-23 18:28:28 (GMT)
committerZack Galbreath <zack.galbreath@kitware.com>2019-04-23 18:56:46 (GMT)
commit95db11fdb189a08a8530a767dea2c272e3605077 (patch)
treee304eb8291a542d65b179f6145144cf03508a96a /Tests/RunCMake/ctest_update/UpdateChangeId-check.cmake
parentd170a3177fdc57c96034f8a2ecf5d0f9aff70af4 (diff)
downloadCMake-95db11fdb189a08a8530a767dea2c272e3605077.zip
CMake-95db11fdb189a08a8530a767dea2c272e3605077.tar.gz
CMake-95db11fdb189a08a8530a767dea2c272e3605077.tar.bz2
ctest: Include ChangeId in Update.xml
Diffstat (limited to 'Tests/RunCMake/ctest_update/UpdateChangeId-check.cmake')
-rw-r--r--Tests/RunCMake/ctest_update/UpdateChangeId-check.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_update/UpdateChangeId-check.cmake b/Tests/RunCMake/ctest_update/UpdateChangeId-check.cmake
new file mode 100644
index 0000000..9269fbc
--- /dev/null
+++ b/Tests/RunCMake/ctest_update/UpdateChangeId-check.cmake
@@ -0,0 +1,12 @@
+file(GLOB update_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Update.xml")
+if(update_xml_file)
+ file(READ "${update_xml_file}" update_xml LIMIT 4096)
+ if(NOT update_xml MATCHES [[ChangeId="&lt;&gt;1"]])
+ string(REPLACE "\n" "\n " update_xml " ${update_xml}")
+ set(RunCMake_TEST_FAILED
+ "Update.xml does not have expected ChangeId:\n${update_xml}"
+ )
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "Update.xml not found")
+endif()