Browse Source

ctest: Restore default of no time limit for command-line `-T Test` step

Refactoring in commit 83845184db (cmCTest: Move timing functions from
cmCTestScriptHandler to cmCTest, 2024-10-23, v4.0.0-rc1~576^2) enabled a
time limit even if the undocumented `CTEST_TIME_LIMIT` script variable
is not set.
Brad King 6 months ago
parent
commit
8745e6308e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/cmCTest.cxx

+ 3 - 0
Source/cmCTest.cxx

@@ -3541,6 +3541,9 @@ cmDuration cmCTest::GetElapsedTime() const
 
 cmDuration cmCTest::GetRemainingTimeAllowed() const
 {
+  if (this->Impl->TimeLimit == cmCTest::MaxDuration()) {
+    return cmCTest::MaxDuration();
+  }
   return this->Impl->TimeLimit - this->GetElapsedTime();
 }