This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  f36c2841a7a62fb1d6df9c12065f79f4a54be996 (commit)
       via  fd2458973141a0820584c36dba3afeb9de032599 (commit)
       via  fe6566df25259a6cd03e756aa148d98c73c6a947 (commit)
      from  7686e8d86bfa049dbf72adb308d9257ebec958a1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f36c2841a7a62fb1d6df9c12065f79f4a54be996
commit f36c2841a7a62fb1d6df9c12065f79f4a54be996
Merge: 7686e8d fd24589
Author:     Zack Galbreath <zack.galbre...@kitware.com>
AuthorDate: Wed Feb 25 09:32:50 2015 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Wed Feb 25 09:32:50 2015 -0500

    Merge topic 'error_in_read_script' into next
    
    fd245897 new RunCMake test cases
    fe6566df Change how CTest errors are reported


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd2458973141a0820584c36dba3afeb9de032599
commit fd2458973141a0820584c36dba3afeb9de032599
Author:     Zack Galbreath <zack.galbre...@kitware.com>
AuthorDate: Tue Feb 24 14:09:40 2015 -0500
Commit:     Zack Galbreath <zack.galbre...@kitware.com>
CommitDate: Tue Feb 24 15:39:07 2015 -0500

    new RunCMake test cases
    
    These new test cases demonstrate that "Error in read script"
    is not printed when compilation errors or test failures are
    encountered by ctest_build or ctest_test, respectively.

diff --git a/Tests/RunCMake/ctest_build/BuildCompileError-stderr.txt 
b/Tests/RunCMake/ctest_build/BuildCompileError-stderr.txt
new file mode 100644
index 0000000..d8e63fa
--- /dev/null
+++ b/Tests/RunCMake/ctest_build/BuildCompileError-stderr.txt
@@ -0,0 +1 @@
+Error\(s\) when building project$
diff --git a/Tests/RunCMake/ctest_build/BuildCompileError-stdout.txt 
b/Tests/RunCMake/ctest_build/BuildCompileError-stdout.txt
new file mode 100644
index 0000000..63215c0
--- /dev/null
+++ b/Tests/RunCMake/ctest_build/BuildCompileError-stdout.txt
@@ -0,0 +1,16 @@
+Run dashboard with model Experimental
+   Source directory: .*/Tests/RunCMake/ctest_build/BuildCompileError
+   Build directory: .*/Tests/RunCMake/ctest_build/BuildCompileError-build
+   Reading ctest configuration file: 
.*/Tests/RunCMake/ctest_build/BuildCompileError/CTestConfig.cmake
+   Site: test-site
+   Build name: test-build-name
+   Use Experimental tag: [0-9-]+
+Configure project
+   Each . represents 1024 bytes of output
+    . Size of output: [0-9]+K
+Build project
+   Each symbol represents 1024 bytes of output.
+   '!' represents an error and '\*' a warning.
+    . Size of output: [0-9]+K
+   [1-9] Compiler errors
+   0 Compiler warnings
diff --git a/Tests/RunCMake/ctest_build/CMakeLists.txt.in 
b/Tests/RunCMake/ctest_build/CMakeLists.txt.in
index 9ba08e9..55ccc19 100644
--- a/Tests/RunCMake/ctest_build/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_build/CMakeLists.txt.in
@@ -1,4 +1,6 @@
 cmake_minimum_required(VERSION 3.1)
-project(CTestBuild@CASE_NAME@ NONE)
+project(CTestBuild@CASE_NAME@)
 include(CTest)
 add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
+add_executable(compile_error EXCLUDE_FROM_ALL
+  @RunCMake_SOURCE_DIR@/../../CTestTestFailure/badCode.cxx)
diff --git a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake 
b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
index 5826fe4..2fc80d3 100644
--- a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
@@ -8,3 +8,4 @@ function(run_ctest_build CASE_NAME)
 endfunction()
 
 run_ctest_build(BuildQuiet QUIET)
+run_ctest_build(BuildCompileError TARGET compile_error)
diff --git a/Tests/RunCMake/ctest_test/CMakeLists.txt.in 
b/Tests/RunCMake/ctest_test/CMakeLists.txt.in
index cedf379..2a095dd 100644
--- a/Tests/RunCMake/ctest_test/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_test/CMakeLists.txt.in
@@ -2,3 +2,6 @@ cmake_minimum_required(VERSION 3.1)
 project(CTestTest@CASE_NAME@ NONE)
 include(CTest)
 add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
+
+add_test(NAME CMakeVersionFail COMMAND "${CMAKE_COMMAND}" --version)
+set_tests_properties(CMakeVersionFail PROPERTIES WILL_FAIL TRUE)
diff --git a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake 
b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
index d906290..24edbd2 100644
--- a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
@@ -7,4 +7,5 @@ function(run_ctest_test CASE_NAME)
   run_ctest(${CASE_NAME})
 endfunction()
 
-run_ctest_test(TestQuiet QUIET)
+run_ctest_test(TestQuiet QUIET EXCLUDE Fail)
+run_ctest_test(TestFail INCLUDE Fail)
diff --git a/Tests/RunCMake/ctest_test/TestFail-stdout.txt 
b/Tests/RunCMake/ctest_test/TestFail-stdout.txt
new file mode 100644
index 0000000..a8d0df6
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestFail-stdout.txt
@@ -0,0 +1,10 @@
+Test project .*/Tests/RunCMake/ctest_test/TestFail-build
+    Start 2: CMakeVersionFail
+1/1 Test #2: CMakeVersionFail .................\*\*\*Failed    [0-9.]+ sec
+
+0% tests passed, 1 tests failed out of 1
+
+Total Test time \(real\) =   [0-9.]+ sec
+
+The following tests FAILED:
+.*2 - CMakeVersionFail \(Failed\)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe6566df25259a6cd03e756aa148d98c73c6a947
commit fe6566df25259a6cd03e756aa148d98c73c6a947
Author:     Zack Galbreath <zack.galbre...@kitware.com>
AuthorDate: Mon Feb 23 15:04:01 2015 -0500
Commit:     Zack Galbreath <zack.galbre...@kitware.com>
CommitDate: Tue Feb 24 14:56:13 2015 -0500

    Change how CTest errors are reported
    
    "Error in read script" should only be displayed for issues
    that the site maintainer is expected to fix.  This message
    should not be displayed for more mundane problems like
    compilation errors & test failures.
    
    We distinguish between these two types of errors with the
    use of the following new function:
    cmCTestGenericHandler::SetScriptErrorOccurred(bool).

diff --git a/Source/CTest/cmCTestCoverageHandler.cxx 
b/Source/CTest/cmCTestCoverageHandler.cxx
index 790e488..ea95401 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -183,6 +183,7 @@ bool cmCTestCoverageHandler::StartCoverageLogFile(
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open log file: "
       << covLogFilename << std::endl);
+    this->SetScriptErrorOccurred(true);
     return false;
     }
   std::string local_start_time = this->CTest->CurrentTime();
@@ -348,6 +349,7 @@ int cmCTestCoverageHandler::ProcessHandler()
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
       "Cannot create LastCoverage.log file" << std::endl);
+    this->SetScriptErrorOccurred(true);
     }
 
   ofs << "Performing coverage: " << elapsed_time_start << std::endl;
@@ -456,6 +458,7 @@ int cmCTestCoverageHandler::ProcessHandler()
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
       "Cannot open coverage summary file." << std::endl);
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
 
@@ -523,6 +526,7 @@ int cmCTestCoverageHandler::ProcessHandler()
       {
       cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find file: "
         << fullFileName << std::endl);
+      this->SetScriptErrorOccurred(true);
       continue;
       }
 
@@ -684,6 +688,7 @@ int cmCTestCoverageHandler::ProcessHandler()
       cmCTestLog(this->CTest, ERROR_MESSAGE,
         "  " << *erIt << std::endl);
       }
+    this->SetScriptErrorOccurred(true);
     }
 
   long total_lines = total_tested + total_untested;
@@ -1005,6 +1010,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
       "Could not find gcov." << std::endl);
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
   std::string gcovExtraFlags
@@ -1112,6 +1118,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
       cmCTestLog(this->CTest, ERROR_MESSAGE,
         "Command produced error: " << errors << std::endl);
       cont->Error ++;
+      this->SetScriptErrorOccurred(true);
       continue;
       }
     if ( retVal != 0 )
@@ -1120,6 +1127,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
         << retVal << " while processing: " << *it << std::endl);
       cmCTestLog(this->CTest, ERROR_MESSAGE,
         "Command produced error: " << cont->Error << std::endl);
+      this->SetScriptErrorOccurred(true);
       }
     cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
       "--------------------------------------------------------------"
@@ -1156,6 +1164,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
           cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e1"
             << std::endl);
           cont->Error ++;
+          this->SetScriptErrorOccurred(true);
           break;
           }
 
@@ -1173,6 +1182,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
           cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e2"
             << std::endl);
           cont->Error ++;
+          this->SetScriptErrorOccurred(true);
           break;
           }
 
@@ -1189,6 +1199,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
           cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e3"
             << std::endl);
           cont->Error ++;
+          this->SetScriptErrorOccurred(true);
           break;
           }
 
@@ -1206,6 +1217,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
           cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e4"
             << std::endl);
           cont->Error ++;
+          this->SetScriptErrorOccurred(true);
           break;
           }
         }
@@ -1220,6 +1232,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
           cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e5"
             << std::endl);
           cont->Error ++;
+          this->SetScriptErrorOccurred(true);
           break;
           }
 
@@ -1236,6 +1249,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
           cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e6"
             << std::endl);
           cont->Error ++;
+          this->SetScriptErrorOccurred(true);
           break;
           }
 
@@ -1253,6 +1267,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
           cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e7"
             << std::endl);
           cont->Error ++;
+          this->SetScriptErrorOccurred(true);
           break;
           }
 
@@ -1270,6 +1285,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
           cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e8"
             << std::endl);
           cont->Error ++;
+          this->SetScriptErrorOccurred(true);
           break;
           }
 
@@ -1287,6 +1303,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
           cmCTestLog(this->CTest, ERROR_MESSAGE,
             "Unknown gcov output line: [" << *line << "]"
             << std::endl);
+          this->SetScriptErrorOccurred(true);
           cont->Error ++;
           //abort();
           }
@@ -1310,6 +1327,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
           {
           cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: "
             << gcovFile << std::endl);
+          this->SetScriptErrorOccurred(true);
           }
         else
           {
@@ -1526,6 +1544,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
       cmCTestLog(this->CTest, ERROR_MESSAGE,
         "Command produced error: " << errors << std::endl);
       cont->Error ++;
+      this->SetScriptErrorOccurred(true);
       continue;
       }
     if ( retVal != 0 )
@@ -1534,6 +1553,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
         << retVal << " while processing: " << *it << std::endl);
       cmCTestLog(this->CTest, ERROR_MESSAGE,
         "Command produced error: " << cont->Error << std::endl);
+      this->SetScriptErrorOccurred(true);
       }
     cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
       "--------------------------------------------------------------"
@@ -1584,6 +1604,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
           {
           cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: "
                      << lcovFile << std::endl);
+          this->SetScriptErrorOccurred(true);
           }
         std::string srcname;
 
@@ -1593,6 +1614,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
           cmCTestLog(this->CTest, ERROR_MESSAGE,
                      "Error while parsing lcov file '" << lcovFile << "':"
                      << " No source file name found!" << std::endl);
+          this->SetScriptErrorOccurred(true);
           return 0;
           }
         srcname = srcname.substr(18);
@@ -1626,6 +1648,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
             {
             cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: "
                        << lcovFile << std::endl);
+            this->SetScriptErrorOccurred(true);
             }
           else
             {
@@ -1801,6 +1824,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
       cmCTestLog(this->CTest, ERROR_MESSAGE,
         "Cannot find source Python file corresponding to: "
         << *fileIt << std::endl);
+      this->SetScriptErrorOccurred(true);
       continue;
       }
 
@@ -1818,6 +1842,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
       {
       cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: "
         << *fileIt << std::endl);
+      this->SetScriptErrorOccurred(true);
       }
     else
       {
@@ -1854,6 +1879,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
               cmCTestLog(this->CTest, ERROR_MESSAGE,
                 "Currently the limit is maximum coverage of 999999"
                 << std::endl);
+              this->SetScriptErrorOccurred(true);
               }
             }
           }
@@ -1948,6 +1974,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Files and full path files not the same size?:\n");
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
   // create the output stream for the CoverageLog-N.xml file
@@ -1955,6 +1982,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
   int logFileCount = 0;
   if ( !this->StartCoverageLogFile(covLogFile, logFileCount) )
     {
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   // for each file run covbr on that file to get the coverage
@@ -1966,6 +1994,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
   if(!this->RunBullseyeCommand(cont, "covbr", 0, outputFile))
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for." << "\n");
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
@@ -1977,6 +2006,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Cannot open coverage file: " <<
                outputFile << std::endl);
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
   std::map<std::string, std::string> fileMap;
@@ -2089,6 +2119,7 @@ int cmCTestCoverageHandler::RunBullseyeCommand(
   if(program.empty())
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find :" << cmd << "\n");
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
   if(arg)
@@ -2120,6 +2151,7 @@ int cmCTestCoverageHandler::RunBullseyeCommand(
                << program << " " << arg << "\n"
                << "kwsys process state : "
                << runCoverageSrc.GetProcessState());
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
   // since we set the output file names wait for it to end
@@ -2137,6 +2169,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
   if(!this->RunBullseyeCommand(cont, "covsrc", "-c", outputFile))
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covsrc:\n");
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
 
@@ -2147,6 +2180,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
       "Cannot open coverage summary file." << std::endl);
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
   this->CTest->StartXML(covSumFile, this->AppendXML);
@@ -2187,6 +2221,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Cannot open coverage summary file: " <<
                outputFile << std::endl);
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
   std::set<std::string> coveredFileNames;
@@ -2351,6 +2386,7 @@ int cmCTestCoverageHandler::HandleBullseyeCoverage(
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Error running bullseye summary.\n");
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
   cmCTestOptionalLog(this->CTest, DEBUG, "HandleBullseyeCoverage return 1 "
@@ -2389,6 +2425,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing string : "
                << inputLine << "\n");
+    this->SetScriptErrorOccurred(true);
     return false;
     }
   // the source file has "" around it so extract out the file name
@@ -2424,6 +2461,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
     cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : "
                << inputLine << " last pos not npos =  " << pos <<
                "\n");
+    this->SetScriptErrorOccurred(true);
     }
   return true;
 }
diff --git a/Source/CTest/cmCTestGenericHandler.cxx 
b/Source/CTest/cmCTestGenericHandler.cxx
index 81eb0a8..c16ec2b 100644
--- a/Source/CTest/cmCTestGenericHandler.cxx
+++ b/Source/CTest/cmCTestGenericHandler.cxx
@@ -23,6 +23,7 @@ cmCTestGenericHandler::cmCTestGenericHandler()
   this->SubmitIndex = 0;
   this->AppendXML = false;
   this->Quiet = false;
+  this->ScriptErrorOccurred = false;
 }
 
 //----------------------------------------------------------------------
diff --git a/Source/CTest/cmCTestGenericHandler.h 
b/Source/CTest/cmCTestGenericHandler.h
index 8567dd7..d83ad7b 100644
--- a/Source/CTest/cmCTestGenericHandler.h
+++ b/Source/CTest/cmCTestGenericHandler.h
@@ -90,6 +90,12 @@ public:
   void SetQuiet(bool b) { this->Quiet = b; }
   bool GetQuiet() { return this->Quiet; }
 
+  /**
+   * Get/Set whether or not a script-level error occurred.
+   */
+  bool GetScriptErrorOccurred() { return this->ScriptErrorOccurred; }
+  void SetScriptErrorOccurred(bool b) { this->ScriptErrorOccurred = b; }
+
 protected:
   bool StartResultingXML(cmCTest::Part part,
                          const char* name, cmGeneratedFileStream& xofs);
@@ -97,6 +103,7 @@ protected:
 
   bool AppendXML;
   bool Quiet;
+  bool ScriptErrorOccurred;
   cmSystemTools::OutputOption HandlerVerbose;
   cmCTest *CTest;
   t_StringToString Options;
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx 
b/Source/CTest/cmCTestHandlerCommand.cxx
index 3003e8a..6c4fa63 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -141,14 +141,19 @@ bool cmCTestHandlerCommand
   cmSystemTools::ChangeDirectory(
     this->CTest->GetCTestConfiguration("BuildDirectory"));
   int res = handler->ProcessHandler();
-  if ( this->Values[ct_RETURN_VALUE] && *this->Values[ct_RETURN_VALUE])
+  cmSystemTools::ChangeDirectory(current_dir);
+
+  if (handler->GetScriptErrorOccurred())
+    {
+    cmSystemTools::SetErrorOccured();
+    }
+  else if ( this->Values[ct_RETURN_VALUE] && *this->Values[ct_RETURN_VALUE])
     {
     std::ostringstream str;
     str << res;
     this->Makefile->AddDefinition(
       this->Values[ct_RETURN_VALUE], str.str().c_str());
     }
-  cmSystemTools::ChangeDirectory(current_dir);
   return true;
 }
 
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx 
b/Source/CTest/cmCTestMemCheckHandler.cxx
index 061f3fd..f603297 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -51,6 +51,7 @@ static void xmlReportError(int line, const char* msg, void* 
data)
   cmCTestLog(ctest, ERROR_MESSAGE,
              "Error parsing XML in stream at line "
              << line << ": " << msg << std::endl);
+  ctest->GetHandler("memcheck")->SetScriptErrorOccurred(true);
 }
 
 // parse the xml file containing the results of last BoundsChecker run
@@ -111,6 +112,7 @@ public:
         this->Errors.push_back(cmCTestMemCheckHandler::ABW); // do not know
         cmCTestLog(this->CTest, ERROR_MESSAGE,
                    "No Category found in Bounds checker XML\n" );
+        this->CTest->GetHandler("memcheck")->SetScriptErrorOccurred(true);
         return;
         }
       while(ptr->ErrorCategory && cat)
@@ -128,6 +130,7 @@ public:
         cmCTestLog(this->CTest, ERROR_MESSAGE,
                    "Found unknown Bounds Checker error "
                    << ptr->ErrorCategory << std::endl);
+        this->CTest->GetHandler("memcheck")->SetScriptErrorOccurred(true);
         }
     }
   cmCTest* CTest;
@@ -175,6 +178,7 @@ int cmCTestMemCheckHandler::PreProcessHandler()
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
       "Problem executing pre-memcheck command(s)." << std::endl);
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
   return 1;
@@ -187,6 +191,7 @@ int cmCTestMemCheckHandler::PostProcessHandler()
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
       "Problem executing post-memcheck command(s)." << std::endl);
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
   return 1;
@@ -646,6 +651,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
             "Cannot find memory checker suppression file: "
             << this->CTest->GetCTestConfiguration(
               "MemoryCheckSuppressionFile") << std::endl);
+          this->SetScriptErrorOccurred(true);
           return false;
           }
         std::string suppressions = "--suppressions="
@@ -671,6 +677,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
                      "Cannot find memory checker suppression file: "
                      << this->CTest->GetCTestConfiguration(
                        "MemoryCheckSuppressionFile").c_str() << std::endl);
+          this->SetScriptErrorOccurred(true);
           return false;
           }
         std::string filterFiles = "/FilterFiles="
@@ -742,6 +749,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
       cmCTestLog(this->CTest, ERROR_MESSAGE,
         "Do not understand memory checker: " << this->MemoryTester
         << std::endl);
+      this->SetScriptErrorOccurred(true);
       return false;
     }
 
@@ -908,6 +916,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput(
           << pfW.match(1) << std::endl);
         ostr << "*** Unknown Purify memory fault: " << pfW.match(1)
           << std::endl;
+        this->SetScriptErrorOccurred(true);
         }
       }
     if ( failure != this->ResultStrings.size() )
@@ -1143,6 +1152,7 @@ bool 
cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput(
         cmCTestLog(this->CTest, ERROR_MESSAGE,
                    "Error in ParseChunk: " << theLine
                    << std::endl);
+        this->SetScriptErrorOccurred(true);
         }
       }
     }
@@ -1217,6 +1227,7 @@ 
cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
     {
     std::string log = "Cannot read memory tester output file: " + ofile;
     cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl);
+    this->SetScriptErrorOccurred(true);
     return;
     }
   res.Output += BOUNDS_CHECKER_MARKER;
@@ -1252,6 +1263,7 @@ 
cmCTestMemCheckHandler::AppendMemTesterOutput(cmCTestTestResult& res,
     {
     std::string log = "Cannot read memory tester output file: " + ofile;
     cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl);
+    this->SetScriptErrorOccurred(true);
     return;
     }
   std::string line;
@@ -1290,6 +1302,7 @@ void cmCTestMemCheckHandler::TestOutputFileNames(int test,
       std::string log = "Cannot find memory tester output file: "
         + ofile;
       cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl);
+      this->SetScriptErrorOccurred(true);
       ofile = "";
       }
     else
@@ -1303,6 +1316,7 @@ void cmCTestMemCheckHandler::TestOutputFileNames(int test,
     std::string log = "Cannot find memory tester output file: "
       + ofile;
     cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl);
+    this->SetScriptErrorOccurred(true);
     ofile = "";
     }
   files.push_back(ofile);
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx 
b/Source/CTest/cmCTestSubmitHandler.cxx
index d585863..ddb5f4c 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -235,6 +235,7 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const 
std::string& localprefix,
           << local_file << std::endl);
         ::curl_easy_cleanup(curl);
         ::curl_global_cleanup();
+        this->SetScriptErrorOccurred(true);
         return false;
         }
       unsigned long filelen = cmSystemTools::FileLength(local_file);
@@ -314,6 +315,7 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const 
std::string& localprefix,
         *this->LogFile << std::endl;
         ::curl_easy_cleanup(curl);
         ::curl_global_cleanup();
+        this->SetScriptErrorOccurred(true);
         return false;
         }
       // always cleanup
@@ -477,6 +479,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const 
std::string& localprefix,
           << local_file << std::endl);
         ::curl_easy_cleanup(curl);
         ::curl_global_cleanup();
+        this->SetScriptErrorOccurred(true);
         return false;
         }
       unsigned long filelen = cmSystemTools::FileLength(local_file);
@@ -621,6 +624,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const 
std::string& localprefix,
           }
         ::curl_easy_cleanup(curl);
         ::curl_global_cleanup();
+        this->SetScriptErrorOccurred(true);
         return false;
         }
       // always cleanup
@@ -783,6 +787,7 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(
           }
         ::curl_easy_cleanup(curl);
         ::curl_global_cleanup();
+        this->SetScriptErrorOccurred(true);
         return false;
         }
 
@@ -908,6 +913,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(
   cmsysProcess_Delete(cp);
   if ( problems )
     {
+    this->SetScriptErrorOccurred(true);
     return false;
     }
   return true;
@@ -929,6 +935,7 @@ bool cmCTestSubmitHandler::SubmitUsingCP(
                << "\tNumber of files: " << files.size() << "\n"
                << "\tremoteprefix: " << remoteprefix << "\n"
                << "\tdestination: " << destination << std::endl);
+    this->SetScriptErrorOccurred(true);
     return 0;
     }
 
@@ -996,6 +1003,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const 
std::string& localprefix,
       {
       cmCTestLog(this->CTest, ERROR_MESSAGE, "  Cannot find file: "
         << local_file.c_str() << std::endl);
+      this->SetScriptErrorOccurred(true);
       return false;
       }
 
@@ -1006,6 +1014,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const 
std::string& localprefix,
       {
       cmCTestLog(this->CTest, ERROR_MESSAGE, "  File too big: "
         << local_file.c_str() << std::endl);
+      this->SetScriptErrorOccurred(true);
       return false;
       }
     size_t fileSize = static_cast<size_t>(st.st_size);
@@ -1014,6 +1023,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const 
std::string& localprefix,
       {
       cmCTestLog(this->CTest, ERROR_MESSAGE, "  Cannot open file: "
         << local_file.c_str() << std::endl);
+      this->SetScriptErrorOccurred(true);
       return false;
       }
 
@@ -1024,6 +1034,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const 
std::string& localprefix,
       fclose(fp);
       cmCTestLog(this->CTest, ERROR_MESSAGE, "  Cannot read file: "
         << local_file.c_str() << std::endl);
+      this->SetScriptErrorOccurred(true);
       return false;
       }
     fclose(fp);
@@ -1041,6 +1052,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const 
std::string& localprefix,
         << env.fault_string << " (" << env.fault_code << ")" << std::endl);
       xmlrpc_env_clean(&env);
       xmlrpc_client_cleanup();
+      this->SetScriptErrorOccurred(true);
       return false;
       }
 
@@ -1097,12 +1109,14 @@ int 
cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Upload file not specified\n");
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   if (!cmSystemTools::FileExists(file))
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Upload file not found: '" << file << "'\n");
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   cmCTestCurl curl(this->CTest);
@@ -1120,6 +1134,7 @@ int 
cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Only http and https are supported for CDASH_UPLOAD\n");
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   char md5sum[33];
@@ -1162,6 +1177,7 @@ int 
cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Error in HttpRequest\n" << response);
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
@@ -1173,6 +1189,7 @@ int 
cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "error parsing json string [" << response << "]\n"
                << reader.getFormattedErrorMessages() << "\n");
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   if(json["status"].asInt() != 0)
@@ -1180,6 +1197,7 @@ int 
cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Bad status returned from CDash: "
                << json["status"].asInt());
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   if(json["datafilesmd5"].isArray())
@@ -1198,6 +1216,7 @@ int 
cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "bad datafilesmd5 value in response "
                << response << "\n");
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
 
@@ -1212,6 +1231,7 @@ int 
cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "error uploading to CDash. "
                << file << " " << url << " " << fstr.str());
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   if(!reader.parse(response, json))
@@ -1219,6 +1239,7 @@ int 
cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "error parsing json string [" << response << "]\n"
                << reader.getFormattedErrorMessages() << "\n");
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
@@ -1249,6 +1270,7 @@ int cmCTestSubmitHandler::ProcessHandler()
     cmCTestLog(this->CTest, ERROR_MESSAGE,
       "Cannot find BuildDirectory  key in the DartConfiguration.tcl"
       << std::endl);
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
 
@@ -1457,6 +1479,7 @@ int cmCTestSubmitHandler::ProcessHandler()
         "   Problems when submitting via FTP"
         << std::endl);
       ofs << "   Problems when submitting via FTP" << std::endl;
+      this->SetScriptErrorOccurred(true);
       return -1;
       }
     if(!this->CDash)
@@ -1474,6 +1497,7 @@ int cmCTestSubmitHandler::ProcessHandler()
         cmCTestLog(this->CTest, ERROR_MESSAGE,
                    "   Problems when triggering via HTTP" << std::endl);
         ofs << "   Problems when triggering via HTTP" << std::endl;
+        this->SetScriptErrorOccurred(true);
         return -1;
         }
       cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
@@ -1517,6 +1541,7 @@ int cmCTestSubmitHandler::ProcessHandler()
       cmCTestLog(this->CTest, ERROR_MESSAGE,
         "   Problems when submitting via HTTP" << std::endl);
       ofs << "   Problems when submitting via HTTP" << std::endl;
+      this->SetScriptErrorOccurred(true);
       return -1;
       }
     if(!this->CDash)
@@ -1532,6 +1557,7 @@ int cmCTestSubmitHandler::ProcessHandler()
         cmCTestLog(this->CTest, ERROR_MESSAGE,
                    "   Problems when triggering via HTTP" << std::endl);
         ofs << "   Problems when triggering via HTTP" << std::endl;
+        this->SetScriptErrorOccurred(true);
         return -1;
         }
       }
@@ -1567,6 +1593,7 @@ int cmCTestSubmitHandler::ProcessHandler()
       cmCTestLog(this->CTest, ERROR_MESSAGE,
         "   Problems when submitting via XML-RPC" << std::endl);
       ofs << "   Problems when submitting via XML-RPC" << std::endl;
+      this->SetScriptErrorOccurred(true);
       return -1;
       }
     cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "   Submission successful"
@@ -1577,6 +1604,7 @@ int cmCTestSubmitHandler::ProcessHandler()
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "   Submission method \"xmlrpc\" not compiled into CTest!"
                << std::endl);
+    this->SetScriptErrorOccurred(true);
     return -1;
 #endif
     }
@@ -1605,6 +1633,7 @@ int cmCTestSubmitHandler::ProcessHandler()
         "   Problems when submitting via SCP"
         << std::endl);
       ofs << "   Problems when submitting via SCP" << std::endl;
+      this->SetScriptErrorOccurred(true);
       return -1;
       }
     cmSystemTools::ChangeDirectory(oldWorkingDirectory);
@@ -1638,6 +1667,7 @@ int cmCTestSubmitHandler::ProcessHandler()
         "   Problems when submitting via CP"
         << std::endl);
       ofs << "   Problems when submitting via cp" << std::endl;
+      this->SetScriptErrorOccurred(true);
       return -1;
       }
     cmSystemTools::ChangeDirectory(oldWorkingDirectory);
@@ -1649,6 +1679,7 @@ int cmCTestSubmitHandler::ProcessHandler()
 
   cmCTestLog(this->CTest, ERROR_MESSAGE, "   Unknown submission method: \""
     << dropMethod << "\"" << std::endl);
+  this->SetScriptErrorOccurred(true);
   return -1;
 }
 
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx 
b/Source/CTest/cmCTestUpdateHandler.cxx
index b18786a..57e9216 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -204,6 +204,7 @@ int cmCTestUpdateHandler::ProcessHandler()
     cmCTestLog(this->CTest, ERROR_MESSAGE,
       "Cannot find SourceDirectory  key in the DartConfiguration.tcl"
       << std::endl);
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
 
@@ -253,6 +254,7 @@ int cmCTestUpdateHandler::ProcessHandler()
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open log file"
       << std::endl);
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   std::string start_time = this->CTest->CurrentTime();
@@ -318,12 +320,14 @@ int cmCTestUpdateHandler::ProcessHandler()
     cmCTestLog(this->CTest, ERROR_MESSAGE,
       "   There are modified or conflicting files in the repository"
       << std::endl);
+    this->SetScriptErrorOccurred(true);
     }
   if(!updated)
     {
     os << "Update command failed:\n" << vc->GetUpdateCommandLine();
     cmCTestLog(this->CTest, ERROR_MESSAGE, "   Update command failed: "
                << vc->GetUpdateCommandLine() << "\n");
+    this->SetScriptErrorOccurred(true);
     }
   os << "</UpdateReturnStatus>" << std::endl;
   os << "</Update>" << std::endl;
@@ -424,6 +428,7 @@ bool cmCTestUpdateHandler::SelectVCS()
         }
       e << " configuration key.";
       cmCTestLog(this->CTest, ERROR_MESSAGE, e.str() << std::endl);
+      this->SetScriptErrorOccurred(true);
       return false;
       }
     }
diff --git a/Source/CTest/cmCTestUploadHandler.cxx 
b/Source/CTest/cmCTestUploadHandler.cxx
index 579190a..965f88e 100644
--- a/Source/CTest/cmCTestUploadHandler.cxx
+++ b/Source/CTest/cmCTestUploadHandler.cxx
@@ -42,6 +42,7 @@ int cmCTestUploadHandler::ProcessHandler()
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
       "Cannot open Upload.xml file" << std::endl);
+    this->SetScriptErrorOccurred(true);
     return -1;
     }
   std::string buildname = cmCTest::SafeBuildIdField(
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index e6d3960..aec943e 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -3122,7 +3122,6 @@ void cmCTest::Log(int logType, const char* file, int 
line, const char* msg,
       cmCTestLogOutputFileLine(err);
       err << msg;
       err.flush();
-      cmSystemTools::SetErrorOccured();
       break;
     default:
       cmCTestLogOutputFileLine(out);

-----------------------------------------------------------------------

Summary of changes:
 Source/CTest/cmCTestCoverageHandler.cxx            |   38 ++++++++++++++++++++
 Source/CTest/cmCTestGenericHandler.cxx             |    1 +
 Source/CTest/cmCTestGenericHandler.h               |    7 ++++
 Source/CTest/cmCTestHandlerCommand.cxx             |    9 +++--
 Source/CTest/cmCTestMemCheckHandler.cxx            |   14 ++++++++
 Source/CTest/cmCTestSubmitHandler.cxx              |   31 ++++++++++++++++
 Source/CTest/cmCTestUpdateHandler.cxx              |    5 +++
 Source/CTest/cmCTestUploadHandler.cxx              |    1 +
 Source/cmCTest.cxx                                 |    1 -
 .../ctest_build/BuildCompileError-stderr.txt       |    1 +
 .../ctest_build/BuildCompileError-stdout.txt       |   16 +++++++++
 Tests/RunCMake/ctest_build/CMakeLists.txt.in       |    4 ++-
 Tests/RunCMake/ctest_build/RunCMakeTest.cmake      |    1 +
 Tests/RunCMake/ctest_test/CMakeLists.txt.in        |    3 ++
 Tests/RunCMake/ctest_test/RunCMakeTest.cmake       |    3 +-
 Tests/RunCMake/ctest_test/TestFail-stdout.txt      |   10 ++++++
 16 files changed, 140 insertions(+), 5 deletions(-)
 create mode 100644 Tests/RunCMake/ctest_build/BuildCompileError-stderr.txt
 create mode 100644 Tests/RunCMake/ctest_build/BuildCompileError-stdout.txt
 create mode 100644 Tests/RunCMake/ctest_test/TestFail-stdout.txt


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to