summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBuildHandler.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-01-14 18:01:38 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-01-14 18:01:38 (GMT)
commit82c3afcf6f78833e55bc6140799b5809a4527f03 (patch)
treeb256f9c50d664798ebbb8f8ab8c94d90acf11cec /Source/CTest/cmCTestBuildHandler.cxx
parente92d99d05c4edf1a7aae5eee4c66432f9e01d04f (diff)
downloadCMake-82c3afcf6f78833e55bc6140799b5809a4527f03.zip
CMake-82c3afcf6f78833e55bc6140799b5809a4527f03.tar.gz
CMake-82c3afcf6f78833e55bc6140799b5809a4527f03.tar.bz2
ENH: allow ctest_build to return error and warning counts
Diffstat (limited to 'Source/CTest/cmCTestBuildHandler.cxx')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index ca7061b..a730981 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -475,7 +475,7 @@ int cmCTestBuildHandler::ProcessHandler()
}
this->GenerateDartBuildOutput(
xofs, this->ErrorsAndWarnings, elapsed_build_time);
- return 0;
+ return res;
}
//----------------------------------------------------------------------
@@ -724,6 +724,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
errorwarning.Error = false;
this->ErrorsAndWarnings.push_back(errorwarning);
this->TotalWarnings ++;
+ return *retVal; // return the program return value
}
}
}
@@ -734,11 +735,13 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
*retVal = cmsysProcess_GetExitException(cp);
cmCTestLog(this->CTest, WARNING, "There was an exception: " << *retVal
<< std::endl);
+ return *retVal;
}
}
else if(result == cmsysProcess_State_Expired)
{
cmCTestLog(this->CTest, WARNING, "There was a timeout" << std::endl);
+ return -1;
}
else if(result == cmsysProcess_State_Error)
{
@@ -754,11 +757,12 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
this->TotalErrors ++;
cmCTestLog(this->CTest, ERROR_MESSAGE, "There was an error: "
<< cmsysProcess_GetErrorString(cp) << std::endl);
+ return -1;
}
cmsysProcess_Delete(cp);
- return result;
+ return 0;
}
//######################################################################