CMake global timeout (--timeout option) should prevail over individual test timeouts if it is lower than the individual timeout.

This commit is contained in:
Zach Mullen 2009-12-07 13:25:54 -05:00
parent 1e04804e84
commit b30f627190
1 changed files with 2 additions and 1 deletions

View File

@ -1051,7 +1051,8 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
p.Cost = rand();
}
if(p.Timeout == 0 && this->CTest->GetGlobalTimeout() != 0)
if((p.Timeout == 0 || p.Timeout > this->CTest->GetGlobalTimeout())
&& this->CTest->GetGlobalTimeout() != 0)
{
p.Timeout = this->CTest->GetGlobalTimeout();
}