mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 12:09:48 +00:00
cmCTest, cmCTestCoverageHandler: remove cwd dance
The working directory changes here didn't really accomplish anything.
This commit is contained in:
parent
c3304fa510
commit
89891bcb9e
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user