diff options
author | Brad King <brad.king@kitware.com> | 2013-01-03 18:53:18 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-01-03 18:53:18 (GMT) |
commit | e2969c503b125a40376ec4ac0399e462e3011077 (patch) | |
tree | 2889777c91c8eae6b36287481730f8e344766b1c /Source | |
parent | de53c4c695604bbe00a2dca86d2ac6f2971e2bdd (diff) | |
parent | e378ba5f39a9d8ebe0335390870a82774ecdd171 (diff) | |
download | CMake-e2969c503b125a40376ec4ac0399e462e3011077.zip CMake-e2969c503b125a40376ec4ac0399e462e3011077.tar.gz CMake-e2969c503b125a40376ec4ac0399e462e3011077.tar.bz2 |
Merge topic 'fix-12904-avoid-overflow'
e378ba5 Add CTestLimitDashJ test (#12904)
3247806 CTest: Prevent creation of unbounded number of tests in ctest (#12904)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index ebef1ed..76ddeea 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -248,7 +248,12 @@ bool cmCTestMultiProcessHandler::StartTest(int test) //--------------------------------------------------------- void cmCTestMultiProcessHandler::StartNextTests() { - size_t numToStart = this->ParallelLevel - this->RunningCount; + size_t numToStart = 0; + if(this->RunningCount < this->ParallelLevel) + { + numToStart = this->ParallelLevel - this->RunningCount; + } + if(numToStart == 0) { return; |