Browse Source

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

Zach Mullen 16 years ago
parent
commit
b30f627190
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/CTest/cmCTestTestHandler.cxx

+ 2 - 1
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();
       }