mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 13:50:10 -05:00
CTest: Improve stop-time implementation
The CTestTestStopTime test has been failing sporadically because the stop time causes the first internal test to have a timeout short enough that we might hit it and start the second test just before the stop time is reached. Instead we should track when a timeout is shortened in order to stay within the stop time. If a test times out for this reason then we should consider the stop time reached and not start any more tests.
This commit is contained in:
@@ -113,6 +113,9 @@ protected:
|
||||
inline size_t GetProcessorsUsed(int index);
|
||||
std::string GetName(int index);
|
||||
|
||||
bool CheckStopTimePassed();
|
||||
void SetStopTimePassed();
|
||||
|
||||
void LockResources(int index);
|
||||
void UnlockResources(int index);
|
||||
// map from test number to set of depend tests
|
||||
@@ -125,7 +128,7 @@ protected:
|
||||
size_t RunningCount;
|
||||
std::set<size_t> ProcessorsAvailable;
|
||||
size_t HaveAffinity;
|
||||
bool StopTimePassed;
|
||||
bool StopTimePassed = false;
|
||||
// list of test properties (indices concurrent to the test map)
|
||||
PropertiesMap Properties;
|
||||
std::map<int, bool> TestRunningMap;
|
||||
|
||||
Reference in New Issue
Block a user