summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake
blob: 428d0b77d73d9022bd98c9e514148b4c16091091 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
include(RunCTest)

if(NOT TIMEOUT)
  # Give the process time to load and start running.
  set(TIMEOUT 4)
endif()

function(run_ctest_timeout CASE_NAME)
  configure_file(${RunCMake_SOURCE_DIR}/TestTimeout.c
                 ${RunCMake_BINARY_DIR}/${CASE_NAME}/TestTimeout.c COPYONLY)
  run_ctest(${CASE_NAME})
endfunction()

run_ctest_timeout(Basic)