diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-10-05 21:53:09 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-10-05 21:53:09 (GMT) |
commit | 027b9cbe87479cda91dcde0854fb2e47c627a237 (patch) | |
tree | 262f65ee144033c6941231e53843a9fcd82b68b0 /Source/CTest/cmCTestCoverageHandler.cxx | |
parent | bdf8e186e5084020a4cbbbe9aa2f63af0febf4ff (diff) | |
download | CMake-027b9cbe87479cda91dcde0854fb2e47c627a237.zip CMake-027b9cbe87479cda91dcde0854fb2e47c627a237.tar.gz CMake-027b9cbe87479cda91dcde0854fb2e47c627a237.tar.bz2 |
BUG: fix bug where converage was required to get valgrind output because of bad current directory
Diffstat (limited to 'Source/CTest/cmCTestCoverageHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 30187e8..55a259e 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -253,7 +253,8 @@ int cmCTestCoverageHandler::ProcessHandler() { cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find any coverage files." << std::endl); - // No coverage files is a valid thing, so the exit code is 0 + // No coverage files is a valid thing, so the exit code is 0 + cmSystemTools::ChangeDirectory(currentDirectory.c_str()); return 0; } @@ -602,7 +603,7 @@ int cmCTestCoverageHandler::ProcessHandler() { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open coverage summary file." << std::endl); - + cmSystemTools::ChangeDirectory(currentDirectory.c_str()); return -1; } @@ -615,6 +616,7 @@ int cmCTestCoverageHandler::ProcessHandler() int logFileCount = 0; if ( !this->StartCoverageLogFile(covLogFile, logFileCount) ) { + cmSystemTools::ChangeDirectory(currentDirectory.c_str()); return -1; } totalCoverageMap::iterator fileIterator; @@ -650,6 +652,7 @@ int cmCTestCoverageHandler::ProcessHandler() logFileCount ++; if ( !this->StartCoverageLogFile(covLogFile, logFileCount) ) { + cmSystemTools::ChangeDirectory(currentDirectory.c_str()); return -1; } } |