summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-05-18 15:52:38 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-05-19 14:26:57 (GMT)
commita1612af7497ca8496f216d95e25e4809da7c7c99 (patch)
treec90a9b926e50ccc78e36ad9366b27a35afee6bc7 /Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
parent6d9bc2d8cf41d651a6e8c9f6e3e6f5ab384d1f6a (diff)
downloadCMake-a1612af7497ca8496f216d95e25e4809da7c7c99.zip
CMake-a1612af7497ca8496f216d95e25e4809da7c7c99.tar.gz
CMake-a1612af7497ca8496f216d95e25e4809da7c7c99.tar.bz2
CTest: Log environment variables as a test measurement
Diffstat (limited to 'Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake b/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
index 777f192..e9aa3a4 100644
--- a/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
@@ -38,6 +38,13 @@ function(run_ctresalloc_verify name tests)
run_cmake_command(${name} "${CTRESALLOC_COMMAND}" verify "${RunCMake_SOURCE_DIR}/${name}.log" "${CMAKE_CURRENT_LIST_DIR}/resspec.json" "${tests}")
endfunction()
+function(read_testing_file filename variable)
+ file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/TAG" _tag)
+ string(REGEX REPLACE "^([^\n]*)\n.*$" "\\1" _date "${_tag}")
+ file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/${_date}/${filename}" _contents)
+ set("${variable}" "${_contents}" PARENT_SCOPE)
+endfunction()
+
unset(ENV{CTEST_RESOURCE_GROUP_COUNT})
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/ctresalloc-write-proc-good1-build")