summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ctest_test/TestChangeId-check.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/ctest_test/TestChangeId-check.cmake')
-rw-r--r--Tests/RunCMake/ctest_test/TestChangeId-check.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_test/TestChangeId-check.cmake b/Tests/RunCMake/ctest_test/TestChangeId-check.cmake
new file mode 100644
index 0000000..b9884f1
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestChangeId-check.cmake
@@ -0,0 +1,12 @@
+file(GLOB test_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Test.xml")
+if(test_xml_file)
+ file(READ "${test_xml_file}" test_xml LIMIT 4096)
+ if(NOT test_xml MATCHES [[ChangeId="<>1"]])
+ string(REPLACE "\n" "\n " test_xml " ${test_xml}")
+ set(RunCMake_TEST_FAILED
+ "Test.xml does not have expected ChangeId:\n${test_xml}"
+ )
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "Test.xml not found")
+endif()