[Cmake-commits] [cmake-commits] zach.mullen committed cmCTestMultiProcessHandler.cxx 1.18 1.19 cmProcess.cxx 1.12 1.13
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Sep 8 14:48:25 EDT 2009
Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv11750
Modified Files:
cmCTestMultiProcessHandler.cxx cmProcess.cxx
Log Message:
BUG: Fixed extraneous newlines from ctest process output
Index: cmCTestMultiProcessHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestMultiProcessHandler.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -C 2 -d -r1.18 -r1.19
*** cmCTestMultiProcessHandler.cxx 8 Sep 2009 17:39:12 -0000 1.18
--- cmCTestMultiProcessHandler.cxx 8 Sep 2009 18:48:23 -0000 1.19
***************
*** 91,95 ****
void cmCTestMultiProcessHandler::StartTestProcess(int test)
{
! cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " test " << test << "\n");
this->TestRunningMap[test] = true; // mark the test as running
// now remove the test itself
--- 91,95 ----
void cmCTestMultiProcessHandler::StartTestProcess(int test)
{
! cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "test " << test << "\n");
this->TestRunningMap[test] = true; // mark the test as running
// now remove the test itself
Index: cmProcess.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmProcess.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -C 2 -d -r1.12 -r1.13
*** cmProcess.cxx 8 Sep 2009 14:16:16 -0000 1.12
--- cmProcess.cxx 8 Sep 2009 18:48:23 -0000 1.13
***************
*** 94,117 ****
this->StdErrorBuffer.begin();
- //If process terminated, flush the buffer
- if(!running)
- {
- if(!this->StdErrorBuffer.empty())
- {
- gotStdErr = true;
- stdErrLine.append(&this->StdErrorBuffer[0], this->StdErrorBuffer.size());
- this->StdErrorBuffer.erase(this->StdErrorBuffer.begin(),
- this->StdErrorBuffer.end());
- }
- if(!this->StdOutBuffer.empty())
- {
- gotStdOut = true;
- stdOutLine.append(&this->StdOutBuffer[0], this->StdOutBuffer.size());
- this->StdOutBuffer.erase(this->StdOutBuffer.begin(),
- this->StdOutBuffer.end());
- }
- return cmsysProcess_Pipe_None;
- }
-
// Check for a newline in stdout.
for(;outiter != this->StdOutBuffer.end(); ++outiter)
--- 94,97 ----
***************
*** 163,166 ****
--- 143,171 ----
}
}
+
+ if(!running && !gotStdErr && !gotStdOut)
+ {
+ //If process terminated with no newline, flush the buffer
+ if(!running)
+ {
+ if(!this->StdErrorBuffer.empty())
+ {
+ gotStdErr = true;
+ stdErrLine.append(&this->StdErrorBuffer[0],
+ this->StdErrorBuffer.size());
+ this->StdErrorBuffer.erase(this->StdErrorBuffer.begin(),
+ this->StdErrorBuffer.end());
+ }
+ if(!this->StdOutBuffer.empty())
+ {
+ gotStdOut = true;
+ stdOutLine.append(&this->StdOutBuffer[0],
+ this->StdOutBuffer.size());
+ this->StdOutBuffer.erase(this->StdOutBuffer.begin(),
+ this->StdOutBuffer.end());
+ }
+ return cmsysProcess_Pipe_None;
+ }
+ }
//If we get here, we have stuff waiting in the buffers, but no newline
return this->LastOutputPipe;
More information about the Cmake-commits
mailing list