summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ctest_build/BuildChangeId-check.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-17 14:36:17 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-07-17 14:36:17 (GMT)
commita5412fbab45c9386f95fba3567e38c7b1cf8308d (patch)
treea1d64dae4636cc5d9d96a2f6914fc42f6bd79e68 /Tests/RunCMake/ctest_build/BuildChangeId-check.cmake
parent536b6c7519e221573cdf96db13b9d72b65c80b0b (diff)
parent601ff0ec55517bc2a80e9a8cc2340f1c18b93490 (diff)
downloadCMake-a5412fbab45c9386f95fba3567e38c7b1cf8308d.zip
CMake-a5412fbab45c9386f95fba3567e38c7b1cf8308d.tar.gz
CMake-a5412fbab45c9386f95fba3567e38c7b1cf8308d.tar.bz2
Merge topic 'ctest-change-id'
601ff0ec CTest: Optionally add a ChangeId attribute on XML Site tags
Diffstat (limited to 'Tests/RunCMake/ctest_build/BuildChangeId-check.cmake')
-rw-r--r--Tests/RunCMake/ctest_build/BuildChangeId-check.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_build/BuildChangeId-check.cmake b/Tests/RunCMake/ctest_build/BuildChangeId-check.cmake
new file mode 100644
index 0000000..074801f
--- /dev/null
+++ b/Tests/RunCMake/ctest_build/BuildChangeId-check.cmake
@@ -0,0 +1,12 @@
+file(GLOB build_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Build.xml")
+if(build_xml_file)
+ file(READ "${build_xml_file}" build_xml LIMIT 4096)
+ if(NOT build_xml MATCHES [[ChangeId="&lt;&gt;1"]])
+ string(REPLACE "\n" "\n " build_xml " ${build_xml}")
+ set(RunCMake_TEST_FAILED
+ "Build.xml does not have expected ChangeId:\n${build_xml}"
+ )
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "Build.xml not found")
+endif()