[cmake-commits] martink committed cmCTestBuildHandler.cxx 1.56 1.57
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Mar 28 10:06:36 EST 2007
Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv27921/CTest
Modified Files:
cmCTestBuildHandler.cxx
Log Message:
BUG: even safer checking of return value
Index: cmCTestBuildHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestBuildHandler.cxx,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- cmCTestBuildHandler.cxx 28 Mar 2007 14:58:00 -0000 1.56
+++ cmCTestBuildHandler.cxx 28 Mar 2007 15:06:34 -0000 1.57
@@ -692,30 +692,35 @@
if(result == cmsysProcess_State_Exited)
{
- *retVal = cmsysProcess_GetExitValue(cp);
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- "Command exited with the value: " << *retVal << std::endl);
- // if a non zero return value
- if (retVal && *retVal)
+ if (retVal)
{
- // If there was an error running command, report that on the dashboard.
- cmCTestBuildErrorWarning errorwarning;
- errorwarning.LogLine = 1;
- errorwarning.Text
- = "*** WARNING non-zero return value in ctest from: ";
- errorwarning.Text += argv[0];
- errorwarning.PreContext = "";
- errorwarning.PostContext = "";
- errorwarning.Error = false;
- this->ErrorsAndWarnings.push_back(errorwarning);
- this->TotalWarnings ++;
+ *retVal = cmsysProcess_GetExitValue(cp);
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ "Command exited with the value: " << *retVal << std::endl);
+ // if a non zero return value
+ if (*retVal)
+ {
+ // If there was an error running command, report that on the dashboard.
+ cmCTestBuildErrorWarning errorwarning;
+ errorwarning.LogLine = 1;
+ errorwarning.Text
+ = "*** WARNING non-zero return value in ctest from: ";
+ errorwarning.Text += argv[0];
+ errorwarning.PreContext = "";
+ errorwarning.PostContext = "";
+ errorwarning.Error = false;
+ this->ErrorsAndWarnings.push_back(errorwarning);
+ this->TotalWarnings ++;
+ }
}
- }
- else if(result == cmsysProcess_State_Exception)
- {
- *retVal = cmsysProcess_GetExitException(cp);
- cmCTestLog(this->CTest, WARNING, "There was an exception: " << *retVal
- << std::endl);
+ else if(result == cmsysProcess_State_Exception)
+ {
+ if (retVal)
+ {
+ *retVal = cmsysProcess_GetExitException(cp);
+ cmCTestLog(this->CTest, WARNING, "There was an exception: " << *retVal
+ << std::endl);
+ }
}
else if(result == cmsysProcess_State_Expired)
{
More information about the Cmake-commits
mailing list