summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CTestHardwareAllocation/ensure_parallel-ctest-s-hw-check.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-07-10 20:33:21 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-02 13:33:54 (GMT)
commitb741ee820d9d5e81a7ec73bda5515465359782af (patch)
treee0f108691d5581b21ef4a388abacb8379a20239d /Tests/RunCMake/CTestHardwareAllocation/ensure_parallel-ctest-s-hw-check.cmake
parent3c8a5aad46ddbd1d0e4c02f09bd403601c6c94b3 (diff)
downloadCMake-b741ee820d9d5e81a7ec73bda5515465359782af.zip
CMake-b741ee820d9d5e81a7ec73bda5515465359782af.tar.gz
CMake-b741ee820d9d5e81a7ec73bda5515465359782af.tar.bz2
Tests: Add test for CTest hardware allocation feature
Diffstat (limited to 'Tests/RunCMake/CTestHardwareAllocation/ensure_parallel-ctest-s-hw-check.cmake')
-rw-r--r--Tests/RunCMake/CTestHardwareAllocation/ensure_parallel-ctest-s-hw-check.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestHardwareAllocation/ensure_parallel-ctest-s-hw-check.cmake b/Tests/RunCMake/CTestHardwareAllocation/ensure_parallel-ctest-s-hw-check.cmake
new file mode 100644
index 0000000..e5f6828
--- /dev/null
+++ b/Tests/RunCMake/CTestHardwareAllocation/ensure_parallel-ctest-s-hw-check.cmake
@@ -0,0 +1,16 @@
+verify_ctest_hardware()
+
+set(expected_contents [[
+begin Test1
+alloc transmogrifiers calvin 2
+begin Test2
+alloc transmogrifiers hobbes 2
+dealloc transmogrifiers calvin 2
+end Test1
+dealloc transmogrifiers hobbes 2
+end Test2
+]])
+file(READ "${RunCMake_TEST_BINARY_DIR}/cthwalloc.log" actual_contents)
+if(NOT actual_contents STREQUAL expected_contents)
+ string(APPEND RunCMake_TEST_FAILED "cthwalloc.log contents did not match expected\n")
+endif()