Merge topic 'fix_ctest_working_dir'

3f94c7c When processing DartMeasurements use the tests working directory.
This commit is contained in:
David Cole 2010-10-28 15:36:17 -04:00 committed by CMake Topic Stage
commit 9bf662a92a
1 changed files with 10 additions and 0 deletions

View File

@ -264,7 +264,17 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
{ {
*this->TestHandler->LogFile << "Test time = " << buf << std::endl; *this->TestHandler->LogFile << "Test time = " << buf << std::endl;
} }
// Set the working directory to the tests directory
std::string oldpath = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::ChangeDirectory(this->TestProperties->Directory.c_str());
this->DartProcessing(); this->DartProcessing();
// restore working directory
cmSystemTools::ChangeDirectory(oldpath.c_str());
// if this is doing MemCheck then all the output needs to be put into // if this is doing MemCheck then all the output needs to be put into
// Output since that is what is parsed by cmCTestMemCheckHandler // Output since that is what is parsed by cmCTestMemCheckHandler
if(!this->TestHandler->MemCheck && started) if(!this->TestHandler->MemCheck && started)