summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestCommand.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-07-13 14:17:18 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-07-13 14:17:18 (GMT)
commit1e72091e8631f1a94262a1a10b58d6b0a975db01 (patch)
tree8b202ee25eff6a384365522cc8a8ffce94a7414a /Source/CTest/cmCTestTestCommand.cxx
parent3e020b3dccd0599bda35f801b54d35092833ee0e (diff)
downloadCMake-1e72091e8631f1a94262a1a10b58d6b0a975db01.zip
CMake-1e72091e8631f1a94262a1a10b58d6b0a975db01.tar.gz
CMake-1e72091e8631f1a94262a1a10b58d6b0a975db01.tar.bz2
ENH: Add timeout support
Diffstat (limited to 'Source/CTest/cmCTestTestCommand.cxx')
-rw-r--r--Source/CTest/cmCTestTestCommand.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index 6be718c..a802f92 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -30,6 +30,18 @@ cmCTestTestCommand::cmCTestTestCommand()
cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
{
+ const char* ctestTimeout = m_Makefile->GetDefinition("CTEST_TEST_TIMEOUT");
+ double timeout = m_CTest->GetTimeOut();
+ if ( ctestTimeout )
+ {
+ timeout = atof(ctestTimeout);
+ }
+ else
+ {
+ // By default use timeout of 10 minutes
+ timeout = 600;
+ }
+ m_CTest->SetTimeOut(timeout);
cmCTestGenericHandler* handler = m_CTest->GetInitializedHandler("test");
if ( m_Values[ctt_START] || m_Values[ctt_END] || m_Values[ctt_STRIDE] )
{