[Cmake-commits] [cmake-commits] zach.mullen committed cmCTestRunTest.cxx 1.35 1.36
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Dec 18 11:43:00 EST 2009
Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv5622
Modified Files:
cmCTestRunTest.cxx
Log Message:
Fix segfault on Borland compiler resulting from divide by 0.
Index: cmCTestRunTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestRunTest.cxx,v
retrieving revision 1.35
retrieving revision 1.36
diff -C 2 -d -r1.35 -r1.36
*** cmCTestRunTest.cxx 17 Dec 2009 16:17:57 -0000 1.35
--- cmCTestRunTest.cxx 18 Dec 2009 16:42:58 -0000 1.36
***************
*** 27,31 ****
this->TestResult.ExecutionTime =0;
this->TestResult.ReturnValue = 0;
! this->TestResult.Status = 0;
this->TestResult.TestCount = 0;
this->TestResult.Properties = 0;
--- 27,31 ----
this->TestResult.ExecutionTime =0;
this->TestResult.ReturnValue = 0;
! this->TestResult.Status = cmCTestTestHandler::NOT_RUN;
this->TestResult.TestCount = 0;
this->TestResult.Properties = 0;
***************
*** 109,113 ****
(void)deflateEnd(&strm);
!
unsigned char *encoded_buffer
= new unsigned char[static_cast<int>(outSize * 1.5)];
--- 109,113 ----
(void)deflateEnd(&strm);
!
unsigned char *encoded_buffer
= new unsigned char[static_cast<int>(outSize * 1.5)];
***************
*** 115,119 ****
unsigned long rlen
= cmsysBase64_Encode(out, strm.total_out, encoded_buffer, 1);
!
for(unsigned long i = 0; i < rlen; i++)
{
--- 115,119 ----
unsigned long rlen
= cmsysBase64_Encode(out, strm.total_out, encoded_buffer, 1);
!
for(unsigned long i = 0; i < rlen; i++)
{
***************
*** 121,126 ****
}
! this->CompressionRatio = static_cast<double>(strm.total_out) /
! static_cast<double>(strm.total_in);
delete [] encoded_buffer;
--- 121,129 ----
}
! if(strm.total_in)
! {
! this->CompressionRatio = static_cast<double>(strm.total_out) /
! static_cast<double>(strm.total_in);
! }
delete [] encoded_buffer;
***************
*** 270,285 ****
if(!this->TestHandler->MemCheck && started)
{
- if (this->TestResult.Status == cmCTestTestHandler::COMPLETED)
- {
this->TestHandler->CleanTestOutput(this->ProcessOutput,
static_cast<size_t>
! (this->TestHandler->CustomMaximumPassedTestOutputSize));
! }
! else
! {
! this->TestHandler->CleanTestOutput(this->ProcessOutput,
! static_cast<size_t>
! (this->TestHandler->CustomMaximumFailedTestOutputSize));
! }
}
this->TestResult.Reason = reason;
--- 273,281 ----
if(!this->TestHandler->MemCheck && started)
{
this->TestHandler->CleanTestOutput(this->ProcessOutput,
static_cast<size_t>
! (this->TestResult.Status == cmCTestTestHandler::COMPLETED ?
! this->TestHandler->CustomMaximumPassedTestOutputSize :
! this->TestHandler->CustomMaximumFailedTestOutputSize));
}
this->TestResult.Reason = reason;
***************
*** 326,330 ****
<< std::endl << std::endl;
}
! // if the test actually stared and ran
// record the results in TestResult
if(started)
--- 322,326 ----
<< std::endl << std::endl;
}
! // if the test actually started and ran
// record the results in TestResult
if(started)
More information about the Cmake-commits
mailing list