summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.h
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/cmCTestRunTest.h
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/cmCTestRunTest.h')
-rw-r--r--Source/CTest/cmCTestRunTest.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h
index ee888d3..ddba40d 100644
--- a/Source/CTest/cmCTestRunTest.h
+++ b/Source/CTest/cmCTestRunTest.h
@@ -47,8 +47,9 @@ public:
cmCTestTestHandler::cmCTestTestResult GetTestResults()
{ return this->TestResult; }
- bool IsRunning();
- void CheckOutput();
+ // Read and store output. Returns true if it must be called again.
+ bool CheckOutput();
+
//launch the test process, return whether it started correctly
bool StartTest();
//capture and report the test results