cmCTest, cmCTestCoverageHandler: remove cwd dance

The working directory changes here didn't really accomplish anything.
This commit is contained in:
Ben Boeckel 2017-03-01 13:38:18 -05:00 committed by Brad King
parent c3304fa510
commit 89891bcb9e
2 changed files with 0 additions and 7 deletions

View File

@ -1646,11 +1646,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
std::string testingDir = this->CTest->GetBinaryDir() + "/Testing";
std::string tempDir = testingDir + "/CoverageInfo";
std::string currentDirectory = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::MakeDirectory(tempDir.c_str());
cmSystemTools::ChangeDirectory(tempDir);
cmSystemTools::ChangeDirectory(currentDirectory);
std::vector<std::string>::iterator fileIt;
int file_count = 0;
@ -1737,7 +1733,6 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
}
++file_count;
}
cmSystemTools::ChangeDirectory(currentDirectory);
return file_count;
}

View File

@ -1122,7 +1122,6 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
if (log) {
*log << "* Run internal CTest" << std::endl;
}
std::string oldpath = cmSystemTools::GetCurrentWorkingDirectory();
CM_AUTO_PTR<cmSystemTools::SaveRestoreEnvironment> saveEnv;
if (modifyEnv) {
@ -1137,7 +1136,6 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
if (log && output) {
*log << *output;
}
cmSystemTools::ChangeDirectory(oldpath);
if (output) {
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
"Internal cmCTest object used to run test." << std::endl