summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index cbac272..1718ac3 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -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();
}