浏览代码

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

Bill Hoffman 18 年之前
父节点
当前提交
cc1f1014e3
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Source/cmCTest.cxx

+ 3 - 1
Source/cmCTest.cxx

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