summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2024-02-27 17:59:21 (GMT)
committerZack Galbreath <zack.galbreath@kitware.com>2024-02-27 18:51:11 (GMT)
commitb47ccc6ba0a987bf9955a75fab169038c9f5a958 (patch)
tree7985caea731725b56f56152f8e5b060fa6b2b7c7 /Tests
parent2043b0d7f09c0393bf68336533260a4ae7bcd552 (diff)
downloadCMake-b47ccc6ba0a987bf9955a75fab169038c9f5a958.zip
CMake-b47ccc6ba0a987bf9955a75fab169038c9f5a958.tar.gz
CMake-b47ccc6ba0a987bf9955a75fab169038c9f5a958.tar.bz2
ctest: include "Time" element in Upload.xml
Add a `<Time>` element to Upload.xml that contains the Unix timestamp when this file was generated. This matches the data recorded by CTest in its other XML files.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/ctest_upload/UploadQuiet-check.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_upload/UploadQuiet-check.cmake b/Tests/RunCMake/ctest_upload/UploadQuiet-check.cmake
new file mode 100644
index 0000000..e45aa73
--- /dev/null
+++ b/Tests/RunCMake/ctest_upload/UploadQuiet-check.cmake
@@ -0,0 +1,12 @@
+file(GLOB upload_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Upload.xml")
+if(upload_xml_file)
+ file(READ "${upload_xml_file}" upload_xml LIMIT 4096)
+ if(NOT upload_xml MATCHES "<Time>")
+ string(REPLACE "\n" "\n " upload_xml " ${upload_xml}")
+ set(RunCMake_TEST_FAILED
+ "Upload.xml does not contain a <Time> attribute:\n${upload_xml}"
+ )
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "Upload.xml not found")
+endif()