ENH: Be more verbose

This commit is contained in:
Andy Cedilnik 2005-06-10 08:56:56 -04:00
parent 708828dc37
commit cf4ed39140
2 changed files with 21 additions and 0 deletions

View File

@ -475,6 +475,11 @@ void cmCTestBuildHandler::GenerateDartBuildOutput(
m_CTest->EndXML(os); m_CTest->EndXML(os);
} }
//######################################################################
//######################################################################
//######################################################################
//######################################################################
//---------------------------------------------------------------------- //----------------------------------------------------------------------
int cmCTestBuildHandler::RunMakeCommand(const char* command, int cmCTestBuildHandler::RunMakeCommand(const char* command,
int* retVal, const char* dir, int timeout, std::ofstream& ofs) int* retVal, const char* dir, int timeout, std::ofstream& ofs)
@ -495,6 +500,14 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
} }
argv.push_back(0); argv.push_back(0);
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Run command:");
std::vector<const char*>::iterator ait;
for ( ait = argv.begin(); ait != argv.end(); ++ ait )
{
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, " \"" << *ait << "\"");
}
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, std::endl);
// Now create process object // Now create process object
cmsysProcess* cp = cmsysProcess_New(); cmsysProcess* cp = cmsysProcess_New();
cmsysProcess_SetCommand(cp, &*argv.begin()); cmsysProcess_SetCommand(cp, &*argv.begin());
@ -553,6 +566,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
if(result == cmsysProcess_State_Exited) if(result == cmsysProcess_State_Exited)
{ {
*retVal = cmsysProcess_GetExitValue(cp); *retVal = cmsysProcess_GetExitValue(cp);
cmCTestLog(m_CTest, HANDLER_VERBOSE_OUTPUT, "Command exited with the value: " << *retVal << std::endl);
} }
else if(result == cmsysProcess_State_Exception) else if(result == cmsysProcess_State_Exception)
{ {
@ -575,6 +589,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
errorwarning.m_Error = true; errorwarning.m_Error = true;
m_ErrorsAndWarnings.push_back(errorwarning); m_ErrorsAndWarnings.push_back(errorwarning);
m_TotalErrors ++; m_TotalErrors ++;
cmCTestLog(this, ERROR_MESSAGE, "There was an error: " << cmsysProcess_GetErrorString(cp) << std::endl);
} }
cmsysProcess_Delete(cp); cmsysProcess_Delete(cp);
@ -582,6 +597,11 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
return result; return result;
} }
//######################################################################
//######################################################################
//######################################################################
//######################################################################
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void cmCTestBuildHandler::ProcessBuffer(const char* data, int length, size_t& tick, size_t tick_len, void cmCTestBuildHandler::ProcessBuffer(const char* data, int length, size_t& tick, size_t tick_len,
std::ofstream& ofs) std::ofstream& ofs)

View File

@ -66,6 +66,7 @@ int cmCTestConfigureHandler::ProcessHandler()
cmGeneratedFileStream ofs; cmGeneratedFileStream ofs;
m_CTest->OpenOutputFile("Temporary", "LastConfigure.log", ofs); m_CTest->OpenOutputFile("Temporary", "LastConfigure.log", ofs);
cmCTestLog(m_CTest, HANDLER_VERBOSE_OUTPUT, "Configure with command: " << cCommand.c_str() << std::endl);
res = m_CTest->RunMakeCommand(cCommand.c_str(), &output, res = m_CTest->RunMakeCommand(cCommand.c_str(), &output,
&retVal, buildDirectory.c_str(), &retVal, buildDirectory.c_str(),
0, ofs); 0, ofs);