ENH: allow test properties to set a timeout that is longer than the default timeout, but not longer than CTEST_TIME_LIMIT for a script

This commit is contained in:
Bill Hoffman 2007-09-18 11:34:53 -04:00
parent 4cb2240576
commit cc1f1014e3
1 changed files with 3 additions and 1 deletions

View File

@ -1095,10 +1095,12 @@ int cmCTest::RunTest(std::vector<const char*> argv,
{ {
timeout = this->TimeOut; timeout = this->TimeOut;
} }
if (testTimeOut && testTimeOut < timeout) if (testTimeOut
&& testTimeOut < this->GetRemainingTimeAllowed())
{ {
timeout = testTimeOut; timeout = testTimeOut;
} }
// always have at least 1 second if we got to here // always have at least 1 second if we got to here
if (timeout <= 0) if (timeout <= 0)
{ {