diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-10-27 14:16:01 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-10-27 14:16:01 (GMT) |
commit | e2b63e473df4d765b737dad35aba90d5f9dd1085 (patch) | |
tree | cc0134b44d71088ccbeed83a2df849e36c04861a /Source/CTest | |
parent | 6bf98dba014f72b62d4f3a24affb279cca9e4d15 (diff) | |
download | CMake-e2b63e473df4d765b737dad35aba90d5f9dd1085.zip CMake-e2b63e473df4d765b737dad35aba90d5f9dd1085.tar.gz CMake-e2b63e473df4d765b737dad35aba90d5f9dd1085.tar.bz2 |
Fix working dir issue for ctest show only mode (-N)
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 1ff5231..024599c 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -344,6 +344,9 @@ void cmCTestMultiProcessHandler::PrintTestList() { count++; cmCTestTestHandler::cmCTestTestProperties& p = *it->second; + //push working dir + std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory(); + cmSystemTools::ChangeDirectory(p.Directory.c_str()); cmCTestRunTest testRun(this->TestHandler); testRun.SetIndex(p.Index); @@ -365,6 +368,8 @@ void cmCTestMultiProcessHandler::PrintTestList() << indexStr.str().c_str()); cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl); + //pop working dir + cmSystemTools::ChangeDirectory(current_dir.c_str()); } cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl << "Total Tests: " << this->Total << std::endl); |