BUG: Handle visual studio 8

This commit is contained in:
Andy Cedilnik 2006-03-21 16:01:50 -05:00
parent 6690a252ab
commit 1cdd8b4fbd
1 changed files with 12 additions and 4 deletions

View File

@ -257,7 +257,8 @@ cmCTest::cmCTest()
this->TestingHandlers["submit"] = new cmCTestSubmitHandler; this->TestingHandlers["submit"] = new cmCTestSubmitHandler;
cmCTest::t_TestingHandlers::iterator it; cmCTest::t_TestingHandlers::iterator it;
for ( it = this->TestingHandlers.begin(); it != this->TestingHandlers.end(); ++ it ) for ( it = this->TestingHandlers.begin();
it != this->TestingHandlers.end(); ++ it )
{ {
it->second->SetCTestInstance(this); it->second->SetCTestInstance(this);
} }
@ -270,7 +271,8 @@ cmCTest::cmCTest()
cmCTest::~cmCTest() cmCTest::~cmCTest()
{ {
cmCTest::t_TestingHandlers::iterator it; cmCTest::t_TestingHandlers::iterator it;
for ( it = this->TestingHandlers.begin(); it != this->TestingHandlers.end(); ++ it ) for ( it = this->TestingHandlers.begin();
it != this->TestingHandlers.end(); ++ it )
{ {
delete it->second; delete it->second;
it->second = 0; it->second = 0;
@ -2168,8 +2170,14 @@ bool cmCTest::RunCommand(
} }
cmsysProcess_WaitForExit(cp, 0); cmsysProcess_WaitForExit(cp, 0);
stdOut->append(&*tempOutput.begin(), tempOutput.size()); if ( tempOutput.size() > 0 )
stdErr->append(&*tempError.begin(), tempError.size()); {
stdOut->append(&*tempOutput.begin(), tempOutput.size());
}
if ( tempError.size() > 0 )
{
stdErr->append(&*tempError.begin(), tempError.size());
}
bool result = true; bool result = true;
if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exited)