diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-01-27 20:54:47 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-01-27 20:54:47 (GMT) |
commit | c22cc421e0344074dd4db2f6003ede96a4df7160 (patch) | |
tree | 8ad4f90eaa87ce15939588fe6b91a456f4183ea3 /Source/CTest/cmCTestCoverageHandler.cxx | |
parent | d268431ac86ad567596861699f4ed38f3ab6aa58 (diff) | |
download | CMake-c22cc421e0344074dd4db2f6003ede96a4df7160.zip CMake-c22cc421e0344074dd4db2f6003ede96a4df7160.tar.gz CMake-c22cc421e0344074dd4db2f6003ede96a4df7160.tar.bz2 |
ENH: Several cleanups and improvements
Diffstat (limited to 'Source/CTest/cmCTestCoverageHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 4f7a42e..b09ac4d 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -154,7 +154,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file, const char* src //---------------------------------------------------------------------- //clearly it would be nice if this were broken up into a few smaller //functions and commented... -int cmCTestCoverageHandler::CoverageDirectory() +int cmCTestCoverageHandler::ProcessHandler() { int error = 0; @@ -330,7 +330,7 @@ int cmCTestCoverageHandler::CoverageDirectory() "Coverage.xml", covSumFile, true)) { std::cerr << "Cannot open coverage summary file: Coverage.xml" << std::endl; - return 1; + return -1; } m_CTest->StartXML(covSumFile); @@ -341,7 +341,7 @@ int cmCTestCoverageHandler::CoverageDirectory() int logFileCount = 0; if ( !this->StartLogFile(covLogFile, logFileCount) ) { - return 1; + return -1; } totalCoverageMap::iterator fileIterator; int cnt = 0; @@ -360,7 +360,7 @@ int cmCTestCoverageHandler::CoverageDirectory() logFileCount ++; if ( !this->StartLogFile(covLogFile, logFileCount) ) { - return 1; + return -1; } } const std::string fullFileName = fileIterator->first; @@ -503,5 +503,9 @@ int cmCTestCoverageHandler::CoverageDirectory() cmSystemTools::ChangeDirectory(currentDirectory.c_str()); - return error; + if ( error ) + { + return -1; + } + return 0; } |