summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMultiProcessHandler.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-09-12 14:49:08 (GMT)
committerBrad King <brad.king@kitware.com>2018-09-12 14:59:55 (GMT)
commited71ec757995e78de31a083a6c8b1092b13dbc08 (patch)
tree3eb1a18db69b44f4dfaf46bc6baf89d74552d1c8 /Source/CTest/cmCTestMultiProcessHandler.h
parent344eb9c8dc3b16a524729cb66ad25fc1c127a02c (diff)
downloadCMake-ed71ec757995e78de31a083a6c8b1092b13dbc08.zip
CMake-ed71ec757995e78de31a083a6c8b1092b13dbc08.tar.gz
CMake-ed71ec757995e78de31a083a6c8b1092b13dbc08.tar.bz2
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.
Diffstat (limited to 'Source/CTest/cmCTestMultiProcessHandler.h')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index 07a5fe7..3927a8a 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -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;