summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMultiProcessHandler.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-11 16:26:41 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-11 16:26:41 (GMT)
commit6a7eae718457e8ad9a91729f4c02a666e6ceba98 (patch)
tree511cd299523a20559c4c4a085dd30ec1d0739c81 /Source/CTest/cmCTestMultiProcessHandler.cxx
parentb6c26cded2965d566ad1ad874f9dac146af4ceac (diff)
downloadCMake-6a7eae718457e8ad9a91729f4c02a666e6ceba98.zip
CMake-6a7eae718457e8ad9a91729f4c02a666e6ceba98.tar.gz
CMake-6a7eae718457e8ad9a91729f4c02a666e6ceba98.tar.bz2
Rewrite CTest child output handling
This commit fixes cmCTestRunTest and cmProcess to more efficiently handle child output. We now use the buffer for each child output pipe to hold at most a partial line plus one new block of data at a time. All complete lines are scanned in-place, and then only the partial line at the end of the buffer is moved back to the beginning before appending new data. We also simplify the cmProcess interface by making GetNextOutputLine the only method that needs to be called while the process is running. This simplifies cmCTestRunTest so that CheckOutput can be called until it returns false when the process is done.
Diffstat (limited to 'Source/CTest/cmCTestMultiProcessHandler.cxx')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 7d3a8bf..2dd66f0 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -226,9 +226,7 @@ bool cmCTestMultiProcessHandler::CheckOutput()
i != this->RunningTests.end(); ++i)
{
cmCTestRunTest* p = *i;
- p->CheckOutput(); //reads and stores the process output
-
- if(!p->IsRunning())
+ if(!p->CheckOutput())
{
finished.push_back(p);
}