summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-11-05 15:46:16 (GMT)
committerBrad King <brad.king@kitware.com>2003-11-05 15:46:16 (GMT)
commit251032b1906f1d9a311449182184db72de6bccae (patch)
treeec3738fe32e6e7a4281cae4c14c157d7306cb889
parentc02edd816a16ef46690c98e115fafa0f6331eb0d (diff)
downloadCMake-251032b1906f1d9a311449182184db72de6bccae.zip
CMake-251032b1906f1d9a311449182184db72de6bccae.tar.gz
CMake-251032b1906f1d9a311449182184db72de6bccae.tar.bz2
BUG#259: Fix for spaces in paths to executable added to previous fixes for this bug.
-rw-r--r--Source/cmCTest.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 9ddc1c9..cb81a90 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1713,10 +1713,8 @@ void cmCTest::ProcessDirectory(std::vector<std::string> &passed,
}
//std::cerr << "Testing " << args[0] << " ... ";
// find the test executable
- std::string testCommand = this->FindTheExecutable(args[1].Value.c_str());
- testCommand = cmSystemTools::ConvertToOutputPath(testCommand.c_str());
-
- std::string actualCommand = testCommand;
+ std::string actualCommand = this->FindTheExecutable(args[1].Value.c_str());
+ std::string testCommand = cmSystemTools::ConvertToOutputPath(actualCommand.c_str());
// continue if we did not find the executable
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)
{
- *output += "\n*** ERROR executing: ";
- *output += cmsysProcess_GetErrorString(cp);
+ std::string outerr = "\n*** ERROR executing: ";
+ outerr += cmsysProcess_GetErrorString(cp);
+ *output += outerr;
+ if ( m_Verbose )
+ {
+ std::cout << outerr.c_str() << "\n";
+ std::cout.flush();
+ }
}
cmsysProcess_Delete(cp);