1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 19:08:07 +08:00

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.
This commit is contained in:
Brad King
2025-08-18 14:04:12 -04:00
parent 7af0e010ba
commit 8745e6308e

View File

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