BUG: even safer checking of return value
This commit is contained in:
parent
c6cf2ca108
commit
f0857fcbd3
|
@ -691,12 +691,14 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
|
|||
int result = cmsysProcess_GetState(cp);
|
||||
|
||||
if(result == cmsysProcess_State_Exited)
|
||||
{
|
||||
if (retVal)
|
||||
{
|
||||
*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;
|
||||
|
@ -712,11 +714,14 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
|
|||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
cmCTestLog(this->CTest, WARNING, "There was a timeout" << std::endl);
|
||||
|
|
Loading…
Reference in New Issue