diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-11-16 15:58:43 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-11-16 15:58:43 (GMT) |
commit | 2921fa96ed836a49d2695b2787d9349885a30a9b (patch) | |
tree | 591e224889e47127e4bdc51c6346fe1f3c1f9860 /Source/CTest | |
parent | 8ec9935099515dd913eaeb1d84dde7c3d232e594 (diff) | |
download | CMake-2921fa96ed836a49d2695b2787d9349885a30a9b.zip CMake-2921fa96ed836a49d2695b2787d9349885a30a9b.tar.gz CMake-2921fa96ed836a49d2695b2787d9349885a30a9b.tar.bz2 |
Handle multiple carriage return issue on windows VS9. Also make sure that running ctest in showonly mode does not kill our cost store, since many ctest tests do this and corrupt our cost data.
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 7 | ||||
-rw-r--r-- | Source/CTest/cmProcess.cxx | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index cc23811..4568e68 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -43,8 +43,11 @@ cmCTestMultiProcessHandler::SetTests(TestMap& tests, this->TestRunningMap[i->first] = false; this->TestFinishMap[i->first] = false; } - this->ReadCostData(); - this->CreateTestCostList(); + if(!this->CTest->GetShowOnly()) + { + this->ReadCostData(); + this->CreateTestCostList(); + } } // Set the max number of tests that can be run at the same time. diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 1895066..b028cc0 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -79,7 +79,10 @@ bool cmProcess::Buffer::GetLine(std::string& line) // Extract the range first..last as a line. const char* text = &*this->begin() + this->First; size_type length = this->Last - this->First; - length -= (length && text[length-1] == '\r')? 1:0; + while(length && text[length-1] == '\r') + { + length --; + } line.assign(text, length); // Start a new range for the next line. |