BUG#259: Fix for spaces in paths to executable added to previous fixes for this bug.

This commit is contained in:
Brad King 2003-11-05 10:46:16 -05:00
parent c02edd816a
commit 251032b190
1 changed files with 10 additions and 6 deletions

View File

@ -1713,10 +1713,8 @@ void cmCTest::ProcessDirectory(std::vector<std::string> &passed,
} }
//std::cerr << "Testing " << args[0] << " ... "; //std::cerr << "Testing " << args[0] << " ... ";
// find the test executable // find the test executable
std::string testCommand = this->FindTheExecutable(args[1].Value.c_str()); std::string actualCommand = this->FindTheExecutable(args[1].Value.c_str());
testCommand = cmSystemTools::ConvertToOutputPath(testCommand.c_str()); std::string testCommand = cmSystemTools::ConvertToOutputPath(actualCommand.c_str());
std::string actualCommand = testCommand;
// continue if we did not find the executable // continue if we did not find the executable
if (testCommand == "") if (testCommand == "")
@ -2472,8 +2470,14 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, int *re
} }
else if(result == cmsysProcess_State_Error) else if(result == cmsysProcess_State_Error)
{ {
*output += "\n*** ERROR executing: "; std::string outerr = "\n*** ERROR executing: ";
*output += cmsysProcess_GetErrorString(cp); outerr += cmsysProcess_GetErrorString(cp);
*output += outerr;
if ( m_Verbose )
{
std::cout << outerr.c_str() << "\n";
std::cout.flush();
}
} }
cmsysProcess_Delete(cp); cmsysProcess_Delete(cp);