ENH: Add timeout support

This commit is contained in:
Andy Cedilnik 2005-07-13 10:17:18 -04:00
parent 3e020b3dcc
commit 1e72091e86
2 changed files with 13 additions and 0 deletions

View File

@ -30,6 +30,18 @@ cmCTestTestCommand::cmCTestTestCommand()
cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler() 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"); cmCTestGenericHandler* handler = m_CTest->GetInitializedHandler("test");
if ( m_Values[ctt_START] || m_Values[ctt_END] || m_Values[ctt_STRIDE] ) if ( m_Values[ctt_START] || m_Values[ctt_END] || m_Values[ctt_STRIDE] )
{ {

View File

@ -92,6 +92,7 @@ public:
///! what is the configuraiton type, e.g. Debug, Release etc. ///! what is the configuraiton type, e.g. Debug, Release etc.
std::string GetConfigType(); std::string GetConfigType();
double GetTimeOut() { return m_TimeOut; } double GetTimeOut() { return m_TimeOut; }
void SetTimeOut(double t) { m_TimeOut = t; }
/** /**
* Check if CTest file exists * Check if CTest file exists