浏览代码

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.
Bill Hoffman 15 年之前
父节点
当前提交
8f8c1edca2
共有 3 个文件被更改,包括 8 次插入2 次删除
  1. 1 1
      Source/CTest/cmCTestRunTest.cxx
  2. 6 0
      Source/CTest/cmProcess.cxx
  3. 1 1
      Source/CTest/cmProcess.h

+ 1 - 1
Source/CTest/cmCTestRunTest.cxx

@@ -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");

+ 6 - 0
Source/CTest/cmProcess.cxx

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

+ 1 - 1
Source/CTest/cmProcess.h

@@ -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: