Fix for bug #10859, ctest exit exception incorrectly reported.

CTest was using the return value from the program instead of the
exit exception value for the process.
This commit is contained in:
Bill Hoffman 2010-06-22 09:55:09 -04:00
parent d7770578d1
commit 8f8c1edca2
3 changed files with 8 additions and 2 deletions

View File

@ -220,7 +220,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
{
outputTestErrorsToConsole = this->CTest->OutputTestOutputOnTestFailure;
cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Exception: ");
switch ( retVal )
switch(this->TestProcess->GetExitException())
{
case cmsysProcess_Exception_Fault:
cmCTestLog(this->CTest, HANDLER_OUTPUT, "SegFault");

View File

@ -264,3 +264,9 @@ int cmProcess::ReportStatus()
return result;
}
int cmProcess::GetExitException()
{
return cmsysProcess_GetExitException(this->Process);
}

View File

@ -43,7 +43,7 @@ public:
void SetId(int id) { this->Id = id;}
int GetExitValue() { return this->ExitValue;}
double GetTotalTime() { return this->TotalTime;}
int GetExitException();
/**
* Read one line of output but block for no more than timeout.
* Returns: