mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-14 02:59:53 -06:00
cmProcess: explicitly track the StopTimeout
When a test can have its timeout reset, the stop time still needs to be considered when setting the new timeout. Track it explicitly.
This commit is contained in:
@@ -816,6 +816,7 @@ bool cmCTestRunTest::ForkProcess()
|
||||
if (timeUntilStop < timeRemaining) {
|
||||
timeRemaining = timeUntilStop;
|
||||
}
|
||||
this->TestProcess->SetStopTimeout(timeUntilStop);
|
||||
}
|
||||
|
||||
// Enforce remaining time even over explicit TIMEOUT=0.
|
||||
|
||||
@@ -37,6 +37,7 @@ public:
|
||||
void SetCommand(std::string const& command);
|
||||
void SetCommandArguments(std::vector<std::string> const& arg);
|
||||
void SetWorkingDirectory(std::string const& dir);
|
||||
void SetStopTimeout(cmDuration t) { this->StopTimeout = t; }
|
||||
void SetTimeout(cmDuration t) { this->Timeout = t; }
|
||||
void ChangeTimeout(cmDuration t);
|
||||
void ResetStartTime();
|
||||
@@ -104,6 +105,7 @@ public:
|
||||
Termination GetTerminationStyle() const { return this->TerminationStyle; }
|
||||
|
||||
private:
|
||||
cm::optional<cmDuration> StopTimeout;
|
||||
cm::optional<cmDuration> Timeout;
|
||||
TimeoutReason TimeoutReason_ = TimeoutReason::Normal;
|
||||
std::chrono::steady_clock::time_point StartTime;
|
||||
|
||||
Reference in New Issue
Block a user