[Cmake-commits] [cmake-commits] hoffman committed cmCTestHandlerCommand.cxx 1.11 1.12 cmCTestScriptHandler.cxx 1.45 1.46

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Dec 18 21:57:46 EST 2008


Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv7315

Modified Files:
	cmCTestHandlerCommand.cxx cmCTestScriptHandler.cxx 
Log Message:
BUG: fix for bug #8224 fix crash


Index: cmCTestHandlerCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestHandlerCommand.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -C 2 -d -r1.11 -r1.12
*** cmCTestHandlerCommand.cxx	23 Jan 2008 15:28:01 -0000	1.11
--- cmCTestHandlerCommand.cxx	19 Dec 2008 02:57:40 -0000	1.12
***************
*** 55,61 ****
      }
  
-   cmCTestLog(this->CTest, DEBUG, "Populate Custom Vectors" << std::endl;);
    handler->PopulateCustomVectors(this->Makefile);
- 
    if ( this->Values[ct_BUILD] )
      {
--- 55,59 ----
***************
*** 66,72 ****
    else
      {
!     this->CTest->SetCTestConfiguration("BuildDirectory",
!       cmSystemTools::CollapseFullPath(
!         this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY")).c_str());
      }
    if ( this->Values[ct_SOURCE] )
--- 64,81 ----
    else
      {
!     const char* bdir = 
!       this->Makefile->GetSafeDefinition("CTEST_BINARY_DIRECTORY");
!     if(bdir)
!       {
!       this->
!         CTest->SetCTestConfiguration("BuildDirectory",
!                                      cmSystemTools::CollapseFullPath(bdir).c_str());
!       }
!     else
!       {
!       cmCTestLog(this->CTest, ERROR_MESSAGE,
!                  "CTEST_BINARY_DIRECTORY not set" << std::endl;);
!       }
! 
      }
    if ( this->Values[ct_SOURCE] )
***************
*** 99,103 ****
        }
      }
- 
    std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory();
    cmSystemTools::ChangeDirectory(
--- 108,111 ----

Index: cmCTestScriptHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestScriptHandler.cxx,v
retrieving revision 1.45
retrieving revision 1.46
diff -C 2 -d -r1.45 -r1.46
*** cmCTestScriptHandler.cxx	23 Nov 2008 15:49:46 -0000	1.45
--- cmCTestScriptHandler.cxx	19 Dec 2008 02:57:42 -0000	1.46
***************
*** 275,285 ****
  
    int retVal = 0;
    if(result == cmsysProcess_State_Exited)
      {
      retVal = cmsysProcess_GetExitValue(cp);
      }
!   else
      {
!     abort();
      }
    return retVal;
--- 275,319 ----
  
    int retVal = 0;
+   bool failed = false;
    if(result == cmsysProcess_State_Exited)
      {
      retVal = cmsysProcess_GetExitValue(cp);
      }
!   else if(result == cmsysProcess_State_Exception)
      {
!     retVal = cmsysProcess_GetExitException(cp);
!     cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was an exception: "
!                << cmsysProcess_GetExceptionString(cp) << " " << 
!                retVal << std::endl);
!     failed = true;
!     }
!   else if(result == cmsysProcess_State_Expired)
!     {
!     cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was a timeout"
!                << std::endl);
!     failed = true;
!     }
!   else if(result == cmsysProcess_State_Error)
!     {
!     cmCTestLog(this->CTest, ERROR_MESSAGE, "\tError executing ctest: "
!                << cmsysProcess_GetErrorString(cp) << std::endl);
!     failed = true;
!     }
!   if(failed)
!     {
!     cmOStringStream message;
!     message << "Error running command: [";
!     message << result << "] ";
!     for(std::vector<const char*>::iterator i = argv.begin();
!         i != argv.end(); ++i)
!       {
!       if(*i)
!         {
!         message  << *i << " ";
!         }
!       }
!     cmCTestLog(this->CTest, ERROR_MESSAGE,
!                message.str() << argv[0] << std::endl);
!     return -1;
      }
    return retVal;



More information about the Cmake-commits mailing list