Procházet zdrojové kódy

COMP: Remove ERROR reserved word or something and replace with ERROR_MESSAGE

Andy Cedilnik před 20 roky
rodič
revize
7f7cf5ee6b

+ 6 - 6
Source/CTest/cmCTestBuildHandler.cxx

@@ -171,7 +171,7 @@ cmCTestBuildHandler::cmCTestBuildHandler()
       }
     else
       {
-      cmCTestLog(m_CTest, ERROR, "Problem Compiling regular expression: "
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Problem Compiling regular expression: "
        << cmCTestWarningErrorFileLine[cc].m_RegularExpressionString << std::endl);
       }
     }
@@ -200,13 +200,13 @@ int cmCTestBuildHandler::ProcessHandler()
   const std::string &makeCommand = m_CTest->GetCTestConfiguration("MakeCommand");
   if ( makeCommand.size() == 0 )
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot find MakeCommand key in the DartConfiguration.tcl" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot find MakeCommand key in the DartConfiguration.tcl" << std::endl);
     return -1;
     }
   const std::string &buildDirectory = m_CTest->GetCTestConfiguration("BuildDirectory");
   if ( buildDirectory.size() == 0 )
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot find BuildDirectory  key in the DartConfiguration.tcl" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot find BuildDirectory  key in the DartConfiguration.tcl" << std::endl);
     return -1;
     }
 
@@ -214,7 +214,7 @@ int cmCTestBuildHandler::ProcessHandler()
   double elapsed_time_start = cmSystemTools::GetTime();
   if ( !m_CTest->OpenOutputFile("Temporary", "LastBuild.log", ofs) )
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot create LastBuild.log file" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot create LastBuild.log file" << std::endl);
     }
 
   m_StartBuild = m_CTest->CurrentTime();
@@ -234,7 +234,7 @@ int cmCTestBuildHandler::ProcessHandler()
   double elapsed_build_time = cmSystemTools::GetTime() - elapsed_time_start;
   if (res != cmsysProcess_State_Exited || retVal )
     {
-    cmCTestLog(m_CTest, ERROR, "Error(s) when building project" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Error(s) when building project" << std::endl);
     }
 
   std::vector<cmStdString>::size_type cc;
@@ -437,7 +437,7 @@ int cmCTestBuildHandler::ProcessHandler()
   cmGeneratedFileStream xofs;
   if( !m_CTest->OpenOutputFile(m_CTest->GetCurrentTag(), "Build.xml", xofs, true) )
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot create build XML file" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot create build XML file" << std::endl);
     return -1;
     }
   this->GenerateDartBuildOutput(xofs, errorsWarnings, elapsed_build_time);

+ 4 - 4
Source/CTest/cmCTestConfigureHandler.cxx

@@ -39,7 +39,7 @@ int cmCTestConfigureHandler::ProcessHandler()
   std::string cCommand = m_CTest->GetCTestConfiguration("ConfigureCommand");
   if ( cCommand.size() == 0 )
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot find ConfigureCommand key in the DartConfiguration.tcl" 
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot find ConfigureCommand key in the DartConfiguration.tcl" 
               << std::endl);
     return -1;
     }
@@ -47,7 +47,7 @@ int cmCTestConfigureHandler::ProcessHandler()
   std::string buildDirectory = m_CTest->GetCTestConfiguration("BuildDirectory");
   if ( buildDirectory.size() == 0 )
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot find BuildDirectory  key in the DartConfiguration.tcl" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot find BuildDirectory  key in the DartConfiguration.tcl" << std::endl);
     return -1;
     }
 
@@ -60,7 +60,7 @@ int cmCTestConfigureHandler::ProcessHandler()
     cmGeneratedFileStream os; 
     if ( !m_CTest->OpenOutputFile(m_CTest->GetCurrentTag(), "Configure.xml", os, true) )
       {
-      cmCTestLog(m_CTest, ERROR, "Cannot open configure file" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot open configure file" << std::endl);
       return 1;
       }
     std::string start_time = m_CTest->CurrentTime();
@@ -105,7 +105,7 @@ int cmCTestConfigureHandler::ProcessHandler()
     }
   if (! res || retVal )
     {
-    cmCTestLog(m_CTest, ERROR, "Error(s) when updating the project" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Error(s) when updating the project" << std::endl);
     return -1;
     }
   return 0;

+ 17 - 17
Source/CTest/cmCTestCoverageHandler.cxx

@@ -46,7 +46,7 @@ bool cmCTestCoverageHandler::StartLogFile(cmGeneratedFileStream& covLogFile, int
   if (!m_CTest->OpenOutputFile(m_CTest->GetCurrentTag(), 
       covLogFilename, covLogFile, true))
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot open log file: " << covLogFilename << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot open log file: " << covLogFilename << std::endl);
     return false;
     }
   std::string local_start_time = m_CTest->CurrentTime();
@@ -183,7 +183,7 @@ int cmCTestCoverageHandler::ProcessHandler()
 
   if ( files.size() == 0 )
     {
-    cmCTestLog(m_CTest, ERROR, " Cannot find any coverage files." << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, " Cannot find any coverage files." << std::endl);
     // No coverage files is a valid thing, so the exit code is 0
     return 0;
     }
@@ -210,13 +210,13 @@ int cmCTestCoverageHandler::ProcessHandler()
       false, 0 /*m_TimeOut*/);
     if ( ! res )
       {
-      cmCTestLog(m_CTest, ERROR, "Problem running coverage on file: " << it->c_str() << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Problem running coverage on file: " << it->c_str() << std::endl);
       error ++;
       continue;
       }
     if ( retVal != 0 )
       {
-      cmCTestLog(m_CTest, ERROR, "Coverage command returned: " << retVal << " while processing: " << it->c_str() << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Coverage command returned: " << retVal << " while processing: " << it->c_str() << std::endl);
       }
     std::vector<cmStdString> lines;
     std::vector<cmStdString>::iterator line;
@@ -245,10 +245,10 @@ int cmCTestCoverageHandler::ProcessHandler()
           }
         if ( cfile.empty() )
           {
-          cmCTestLog(m_CTest, ERROR, "Something went wrong" << std::endl);
-          cmCTestLog(m_CTest, ERROR, "File: [" << file << "]" << std::endl);
-          cmCTestLog(m_CTest, ERROR, "s: [" << file.substr(0, sourceDir.size()) << "]" << std::endl);
-          cmCTestLog(m_CTest, ERROR, "b: [" << file.substr(0, binaryDir.size()) << "]" << std::endl);
+          cmCTestLog(m_CTest, ERROR_MESSAGE, "Something went wrong" << std::endl);
+          cmCTestLog(m_CTest, ERROR_MESSAGE, "File: [" << file << "]" << std::endl);
+          cmCTestLog(m_CTest, ERROR_MESSAGE, "s: [" << file.substr(0, sourceDir.size()) << "]" << std::endl);
+          cmCTestLog(m_CTest, ERROR_MESSAGE, "b: [" << file.substr(0, binaryDir.size()) << "]" << std::endl);
           }
         }
       else if ( re2.find(line->c_str() ) )
@@ -261,7 +261,7 @@ int cmCTestCoverageHandler::ProcessHandler()
           std::ifstream ifile(fname.c_str());
           if ( ! ifile )
             {
-            cmCTestLog(m_CTest, ERROR, "Cannot open file: " << fname << std::endl);
+            cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot open file: " << fname << std::endl);
             }
           else
             {
@@ -298,7 +298,7 @@ int cmCTestCoverageHandler::ProcessHandler()
         }
       else
         {
-        cmCTestLog(m_CTest, ERROR, "Unknown line: " << line->c_str() << std::endl);
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "Unknown line: " << line->c_str() << std::endl);
         error ++;
         }
       }
@@ -310,7 +310,7 @@ int cmCTestCoverageHandler::ProcessHandler()
   if (!m_CTest->OpenOutputFile(m_CTest->GetCurrentTag(), 
       "Coverage.xml", covSumFile, true))
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot open coverage summary file: Coverage.xml" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot open coverage summary file: Coverage.xml" << std::endl);
 
     return -1;
     }
@@ -348,13 +348,13 @@ int cmCTestCoverageHandler::ProcessHandler()
     const std::string fullFileName = fileIterator->first;
     const std::string fileName = cmSystemTools::GetFilenameName(fullFileName.c_str());
     std::string fullFilePath = cmSystemTools::GetFilenamePath(fullFileName.c_str());
-    cmCTestLog(m_CTest, ERROR, "Process file: " << fullFileName << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Process file: " << fullFileName << std::endl);
 
     cmSystemTools::ConvertToUnixSlashes(fullFilePath);
 
     if ( !cmSystemTools::FileExists(fullFileName.c_str()) )
       {
-      cmCTestLog(m_CTest, ERROR, "Cannot find file: " << fullFileName.c_str() << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot find file: " << fullFileName.c_str() << std::endl);
       continue;
       }
 
@@ -363,7 +363,7 @@ int cmCTestCoverageHandler::ProcessHandler()
         sourceDir.c_str(), binaryDir.c_str());
     if ( !shouldIDoCoverage )
       {
-      cmCTestLog(m_CTest, ERROR, ".NoDartCoverage found, so skip coverage check for: "
+      cmCTestLog(m_CTest, ERROR_MESSAGE, ".NoDartCoverage found, so skip coverage check for: "
         << fullFileName.c_str()
         << std::endl);
       continue;
@@ -379,7 +379,7 @@ int cmCTestCoverageHandler::ProcessHandler()
     std::ifstream ifs(fullFileName.c_str());
     if ( !ifs)
       {
-      cmCTestLog(m_CTest, ERROR, "Cannot open source file: " << fullFileName.c_str() << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot open source file: " << fullFileName.c_str() << std::endl);
       error ++;
       continue;
       }
@@ -393,7 +393,7 @@ int cmCTestCoverageHandler::ProcessHandler()
       {
       if ( !cmSystemTools::GetLineFromStream(ifs, line) )
         {
-        cmCTestLog(m_CTest, ERROR, "Problem reading source file: " << fullFileName.c_str() << " line:" << cc << std::endl);
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "Problem reading source file: " << fullFileName.c_str() << " line:" << cc << std::endl);
         error ++;
         break;
         }
@@ -410,7 +410,7 @@ int cmCTestCoverageHandler::ProcessHandler()
       }
     if ( cmSystemTools::GetLineFromStream(ifs, line) )
       {
-      cmCTestLog(m_CTest, ERROR, "Looks like there are more lines in the file: " << line << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Looks like there are more lines in the file: " << line << std::endl);
       }
     float cper = 0;
     float cmet = 0;

+ 9 - 9
Source/CTest/cmCTestMemCheckHandler.cxx

@@ -100,7 +100,7 @@ int cmCTestMemCheckHandler::PreProcessHandler()
 
   if ( !this->ExecuteCommands(m_CustomPreMemCheck) )
     {
-    cmCTestLog(m_CTest, ERROR, "Problem executing pre-memcheck command(s)." << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Problem executing pre-memcheck command(s)." << std::endl);
     return 0;
     }
   return 1;
@@ -111,7 +111,7 @@ int cmCTestMemCheckHandler::PostProcessHandler()
 {
   if ( !this->ExecuteCommands(m_CustomPostMemCheck) )
     {
-    cmCTestLog(m_CTest, ERROR, "Problem executing post-memcheck command(s)." << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Problem executing post-memcheck command(s)." << std::endl);
     return 0;
     }
   return 1;
@@ -296,7 +296,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
     }
   else
     {
-    cmCTestLog(m_CTest, ERROR, "Memory checker (MemoryCheckCommand) not set, or cannot find the specified program." 
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Memory checker (MemoryCheckCommand) not set, or cannot find the specified program." 
       << std::endl);
     return false;
     }
@@ -330,7 +330,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
       {
       if ( !cmSystemTools::FileExists(m_CTest->GetCTestConfiguration("MemoryCheckSuppressionFile").c_str()) )
         {
-        cmCTestLog(m_CTest, ERROR, "Cannot find memory checker suppression file: " 
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot find memory checker suppression file: " 
           << m_CTest->GetCTestConfiguration("MemoryCheckSuppressionFile").c_str() << std::endl);
         return false;
         }
@@ -349,12 +349,12 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
   else if ( m_MemoryTester.find("boundschecker") != std::string::npos )
     {
     m_MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER;
-    cmCTestLog(m_CTest, ERROR, "Bounds checker not yet implemented" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Bounds checker not yet implemented" << std::endl);
     return false;
     }
   else
     {
-    cmCTestLog(m_CTest, ERROR, "Do not understand memory checker: " << m_MemoryTester.c_str() << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Do not understand memory checker: " << m_MemoryTester.c_str() << std::endl);
     return false;
     }
 
@@ -409,7 +409,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput(
   if ( !cmSystemTools::FileExists(m_MemoryTesterOutputFile.c_str()) )
     {
     log = "Cannot find Purify output file: " + m_MemoryTesterOutputFile;
-    cmCTestLog(m_CTest, ERROR, log.c_str() << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, log.c_str() << std::endl);
     return false;
     }
 
@@ -417,7 +417,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput(
   if ( !ifs )
     {
     log = "Cannot read Purify output file: " + m_MemoryTesterOutputFile;
-    cmCTestLog(m_CTest, ERROR, log.c_str() << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, log.c_str() << std::endl);
     return false;
     }
 
@@ -445,7 +445,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput(
         }
       if ( cc == cmCTestMemCheckHandler::NO_MEMORY_FAULT )
         {
-        cmCTestLog(m_CTest, ERROR, "Unknown Purify memory fault: " << pfW.match(1) << std::endl);
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "Unknown Purify memory fault: " << pfW.match(1) << std::endl);
         ostr << "*** Unknown Purify memory fault: " << pfW.match(1) << std::endl;
         }
       }

+ 4 - 4
Source/CTest/cmCTestScriptHandler.cxx

@@ -585,7 +585,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
     {
     if ( !cmCTestScriptHandler::EmptyBinaryDirectory(m_BinaryDir.c_str()) )
       {
-      cmCTestLog(m_CTest, ERROR, "Problem removing the binary directory" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Problem removing the binary directory" << std::endl);
       }
     }
   
@@ -684,7 +684,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
         }
       else
         {
-        cmCTestLog(m_CTest, ERROR, "Cannot open CMake output file: "
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot open CMake output file: "
           << cmakeOutputFile.c_str() << " for writing" << std::endl);
         }
       }
@@ -717,11 +717,11 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
       this->RestoreBackupDirectories();
       if (cmakeFailed)
         {
-        cmCTestLog(m_CTest, ERROR, "Unable to run cmake:" << std::endl
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "Unable to run cmake:" << std::endl
           << cmakeFailedOuput.c_str() << std::endl);
         return 10;
         }
-      cmCTestLog(m_CTest, ERROR, "Unable to run ctest:" << std::endl
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Unable to run ctest:" << std::endl
         << output.c_str() << std::endl);
       if (!res)
         {

+ 22 - 22
Source/CTest/cmCTestSubmitHandler.cxx

@@ -217,12 +217,12 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const cmStdString& localprefix,
       fclose(ftpfile);
       if ( res )
         {
-        cmCTestLog(m_CTest, ERROR, "  Error when uploading file: " << local_file.c_str() << std::endl);
-        cmCTestLog(m_CTest, ERROR, "  Error message was: " << error_buffer << std::endl);
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "  Error when uploading file: " << local_file.c_str() << std::endl);
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "  Error message was: " << error_buffer << std::endl);
         *m_LogFile << "  Error when uploading file: " << local_file.c_str() << std::endl
           << "  Error message was: " << error_buffer << std::endl
           << "  Curl output was: " << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << std::endl;
-        cmCTestLog(m_CTest, ERROR, "CURL output: ["
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "CURL output: ["
           << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" << std::endl);
         ::curl_easy_cleanup(curl);
         ::curl_global_cleanup(); 
@@ -365,12 +365,12 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
       fclose(ftpfile);
       if ( res )
         {
-        cmCTestLog(m_CTest, ERROR, "  Error when uploading file: " << local_file.c_str() << std::endl);
-        cmCTestLog(m_CTest, ERROR, "  Error message was: " << error_buffer << std::endl);
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "  Error when uploading file: " << local_file.c_str() << std::endl);
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "  Error message was: " << error_buffer << std::endl);
         *m_LogFile << "  Error when uploading file: " << local_file.c_str() << std::endl
           << "  Error message was: " << error_buffer << std::endl
           << "  Curl output was: " << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << std::endl;
-        cmCTestLog(m_CTest, ERROR, "CURL output: ["
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "CURL output: ["
           << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" << std::endl);
         ::curl_easy_cleanup(curl);
         ::curl_global_cleanup(); 
@@ -473,12 +473,12 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::vector<cmStdString>& file
       curl_easy_setopt(curl, CURLOPT_URL, turl.c_str());
       if ( curl_easy_perform(curl) )
         {
-        cmCTestLog(m_CTest, ERROR, "  Error when triggering: " << turl.c_str() << std::endl);
-        cmCTestLog(m_CTest, ERROR, "  Error message was: " << error_buffer << std::endl);
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "  Error when triggering: " << turl.c_str() << std::endl);
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "  Error message was: " << error_buffer << std::endl);
         *m_LogFile << "\tTrigerring failed with error: " << error_buffer << std::endl
           << "  Error message was: " << error_buffer << std::endl
           << "  Curl output was: " << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << std::endl;
-        cmCTestLog(m_CTest, ERROR, "CURL output: ["
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "CURL output: ["
           << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" << std::endl);
         ::curl_easy_cleanup(curl);
         ::curl_global_cleanup(); 
@@ -565,19 +565,19 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(
     else if(result == cmsysProcess_State_Exception)
       {
       retVal = cmsysProcess_GetExitException(cp);
-      cmCTestLog(m_CTest, ERROR, "\tThere was an exception: " << retVal << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "\tThere was an exception: " << retVal << std::endl);
       *m_LogFile << "\tThere was an exception: " << retVal << std::endl;
       problems ++;
       }
     else if(result == cmsysProcess_State_Expired)
       {
-      cmCTestLog(m_CTest, ERROR, "\tThere was a timeout" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "\tThere was a timeout" << std::endl);
       *m_LogFile << "\tThere was a timeout" << std::endl;
       problems ++;
       } 
     else if(result == cmsysProcess_State_Error)
       {
-      cmCTestLog(m_CTest, ERROR, "\tError executing SCP: "
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "\tError executing SCP: "
         << cmsysProcess_GetErrorString(cp) << std::endl);
       *m_LogFile << "\tError executing SCP: "
         << cmsysProcess_GetErrorString(cp) << std::endl;
@@ -649,7 +649,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix,
 
     if ( env.fault_occurred )
       {
-      cmCTestLog(m_CTest, ERROR, " Submission problem: " << env.fault_string << " (" << env.fault_code << ")" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, " Submission problem: " << env.fault_string << " (" << env.fault_code << ")" << std::endl);
       xmlrpc_env_clean(&env);
       xmlrpc_client_cleanup();
       return false;
@@ -673,7 +673,7 @@ int cmCTestSubmitHandler::ProcessHandler()
   const std::string &buildDirectory = m_CTest->GetCTestConfiguration("BuildDirectory");
   if ( buildDirectory.size() == 0 )
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot find BuildDirectory  key in the DartConfiguration.tcl" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot find BuildDirectory  key in the DartConfiguration.tcl" << std::endl);
     return -1;
     }
 
@@ -707,7 +707,7 @@ int cmCTestSubmitHandler::ProcessHandler()
       }
     else
       {
-      cmCTestLog(m_CTest, ERROR, "Problem globbing" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Problem globbing" << std::endl);
       }
     }
   m_CTest->AddIfExists(files, "DynamicAnalysis.xml");
@@ -741,13 +741,13 @@ int cmCTestSubmitHandler::ProcessHandler()
     if ( !this->SubmitUsingFTP(buildDirectory+"/Testing/"+m_CTest->GetCurrentTag(), 
         files, prefix, url) )
       {
-      cmCTestLog(m_CTest, ERROR, "  Problems when submitting via FTP" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "  Problems when submitting via FTP" << std::endl);
       ofs << "  Problems when submitting via FTP" << std::endl;
       return -1;
       }
     if ( !this->TriggerUsingHTTP(files, prefix, m_CTest->GetCTestConfiguration("TriggerSite")) )
       {
-      cmCTestLog(m_CTest, ERROR, "  Problems when triggering via HTTP" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "  Problems when triggering via HTTP" << std::endl);
       ofs << "  Problems when triggering via HTTP" << std::endl;
       return -1;
       }
@@ -772,13 +772,13 @@ int cmCTestSubmitHandler::ProcessHandler()
     url += m_CTest->GetCTestConfiguration("DropSite") + m_CTest->GetCTestConfiguration("DropLocation");
     if ( !this->SubmitUsingHTTP(buildDirectory +"/Testing/"+m_CTest->GetCurrentTag(), files, prefix, url) )
       {
-      cmCTestLog(m_CTest, ERROR, "  Problems when submitting via HTTP" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "  Problems when submitting via HTTP" << std::endl);
       ofs << "  Problems when submitting via HTTP" << std::endl;
       return -1;
       }
     if ( !this->TriggerUsingHTTP(files, prefix, m_CTest->GetCTestConfiguration("TriggerSite")) )
       {
-      cmCTestLog(m_CTest, ERROR, "  Problems when triggering via HTTP" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "  Problems when triggering via HTTP" << std::endl);
       ofs << "  Problems when triggering via HTTP" << std::endl;
       return -1;
       }
@@ -794,7 +794,7 @@ int cmCTestSubmitHandler::ProcessHandler()
     prefix = m_CTest->GetCTestConfiguration("DropLocation");
     if ( !this->SubmitUsingXMLRPC(buildDirectory+"/Testing/"+m_CTest->GetCurrentTag(), files, prefix, url) )
       {
-      cmCTestLog(m_CTest, ERROR, "  Problems when submitting via XML-RPC" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "  Problems when submitting via XML-RPC" << std::endl);
       ofs << "  Problems when submitting via XML-RPC" << std::endl;
       return -1;
       }
@@ -814,14 +814,14 @@ int cmCTestSubmitHandler::ProcessHandler()
     if ( !this->SubmitUsingSCP(m_CTest->GetCTestConfiguration("ScpCommand"),
         buildDirectory+"/Testing/"+m_CTest->GetCurrentTag(), files, prefix, url) )
       {
-      cmCTestLog(m_CTest, ERROR, "  Problems when submitting via SCP" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "  Problems when submitting via SCP" << std::endl);
       ofs << "  Problems when submitting via SCP" << std::endl;
       return -1;
       }
     cmCTestLog(m_CTest, HANDLER_OUTPUT, "  Submission successful" << std::endl);
     ofs << "  Submission successful" << std::endl;
     }
-  cmCTestLog(m_CTest, ERROR, "   Unknown submission method: \"" << m_CTest->GetCTestConfiguration("DropMethod") << "\"" << std::endl);
+  cmCTestLog(m_CTest, ERROR_MESSAGE, "   Unknown submission method: \"" << m_CTest->GetCTestConfiguration("DropMethod") << "\"" << std::endl);
   return -1;
 }
 

+ 7 - 7
Source/CTest/cmCTestTestHandler.cxx

@@ -177,7 +177,7 @@ int cmCTestTestHandler::PreProcessHandler()
 {
   if ( !this->ExecuteCommands(m_CustomPreTest) )
     {
-    cmCTestLog(m_CTest, ERROR, "Problem executing pre-test command(s)." << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Problem executing pre-test command(s)." << std::endl);
     return 0;
     }
   return 1;
@@ -188,7 +188,7 @@ int cmCTestTestHandler::PostProcessHandler()
 {
   if ( !this->ExecuteCommands(m_CustomPostTest) )
     {
-    cmCTestLog(m_CTest, ERROR, "Problem executing post-test command(s)." << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Problem executing post-test command(s)." << std::endl);
     return 0;
     }
   return 1;
@@ -236,7 +236,7 @@ int cmCTestTestHandler::ProcessHandler()
     {
     if ( !m_CTest->GetShowOnly() )
       {
-      cmCTestLog(m_CTest, ERROR, "No tests were found!!!" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "No tests were found!!!" << std::endl);
       }
     }
   else
@@ -266,7 +266,7 @@ int cmCTestTestHandler::ProcessHandler()
       {
       cmGeneratedFileStream ofs;
 
-      cmCTestLog(m_CTest, ERROR, std::endl << "The following tests FAILED:" << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, std::endl << "The following tests FAILED:" << std::endl);
       m_CTest->OpenOutputFile("Temporary", "LastTestsFailed.log", ofs);
 
       std::vector<cmCTestTestHandler::cmCTestTestResult>::iterator ftit;
@@ -291,7 +291,7 @@ int cmCTestTestHandler::ProcessHandler()
     if( !m_CTest->OpenOutputFile(m_CTest->GetCurrentTag(), 
         (m_MemCheck ? "DynamicAnalysis.xml" : "Test.xml"), xmlfile, true) )
       {
-      cmCTestLog(m_CTest, ERROR, "Cannot create " << (m_MemCheck ? "memory check" : "testing")
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot create " << (m_MemCheck ? "memory check" : "testing")
         << " XML file" << std::endl);
       return 1;
       }
@@ -428,7 +428,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
     // continue if we did not find the executable
     if (testCommand == "")
       {
-      cmCTestLog(m_CTest, ERROR, "Unable to find executable: "
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Unable to find executable: "
         << args[1].Value.c_str() << std::endl);
       if ( !m_CTest->GetShowOnly() )
         {
@@ -705,7 +705,7 @@ int cmCTestTestHandler::ExecuteCommands(std::vector<cmStdString>& vec)
     if ( !cmSystemTools::RunSingleCommand(it->c_str(), 0, &retVal, 0, true /*m_Verbose*/) || 
       retVal != 0 )
       {
-      cmCTestLog(m_CTest, ERROR, "Problem running command: " << *it << std::endl);
+      cmCTestLog(m_CTest, ERROR_MESSAGE, "Problem running command: " << *it << std::endl);
       return 0;
       }
     }

+ 9 - 9
Source/CTest/cmCTestUpdateHandler.cxx

@@ -204,7 +204,7 @@ int cmCTestUpdateHandler::ProcessHandler()
   const char* sourceDirectory = this->GetOption("SourceDirectory");
   if ( !sourceDirectory )
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot find SourceDirectory  key in the DartConfiguration.tcl" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot find SourceDirectory  key in the DartConfiguration.tcl" << std::endl);
     return -1;
     }
 
@@ -220,7 +220,7 @@ int cmCTestUpdateHandler::ProcessHandler()
       updateCommand = m_CTest->GetCTestConfiguration("SVNCommand");
       if ( updateCommand.empty() )
         {
-        cmCTestLog(m_CTest, ERROR, "Cannot find CVSCommand, SVNCommand, or UpdateCommand key in the DartConfiguration.tcl" << std::endl);
+        cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot find CVSCommand, SVNCommand, or UpdateCommand key in the DartConfiguration.tcl" << std::endl);
         return -1;
         }
       else
@@ -359,7 +359,7 @@ int cmCTestUpdateHandler::ProcessHandler()
   cmGeneratedFileStream os; 
   if ( !m_CTest->OpenOutputFile(m_CTest->GetCurrentTag(), "Update.xml", os, true) )
     {
-    cmCTestLog(m_CTest, ERROR, "Cannot open log file" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Cannot open log file" << std::endl);
     }
   std::string start_time = m_CTest->CurrentTime();
   double elapsed_time_start = cmSystemTools::GetTime();
@@ -597,11 +597,11 @@ int cmCTestUpdateHandler::ProcessHandler()
             srevision1 = str.str();
             if (!svn_status_line_regex.find(output))
               {
-              cmCTestLog(m_CTest, ERROR, "Bad output from SVN status command: " << output << std::endl);
+              cmCTestLog(m_CTest, ERROR_MESSAGE, "Bad output from SVN status command: " << output << std::endl);
               }
             else if ( svn_status_line_regex.match(4) != file )
               {
-              cmCTestLog(m_CTest, ERROR, "Bad output from SVN status command. The file name returned: \"" << svn_status_line_regex.match(4) << "\" was different than the file specified: \"" << file << "\"" << std::endl);
+              cmCTestLog(m_CTest, ERROR_MESSAGE, "Bad output from SVN status command. The file name returned: \"" << svn_status_line_regex.match(4) << "\" was different than the file specified: \"" << file << "\"" << std::endl);
               }
             else
               {
@@ -811,13 +811,13 @@ int cmCTestUpdateHandler::ProcessHandler()
   if ( num_modified > 0 || num_conflicting > 0 )
     {
     os << "Update error: There are modified or conflicting files in the repository";
-    cmCTestLog(m_CTest, ERROR, "   There are modified or conflicting files in the repository" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "   There are modified or conflicting files in the repository" << std::endl);
     }
   if ( updateProducedError )
     {
     os << "Update error: ";
     os << m_CTest->MakeXMLSafe(goutput);
-    cmCTestLog(m_CTest, ERROR, "   Update with command: " << command << " failed" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "   Update with command: " << command << " failed" << std::endl);
     }
   os << "</UpdateReturnStatus>" << std::endl;
   os << "</Update>" << std::endl;
@@ -829,8 +829,8 @@ int cmCTestUpdateHandler::ProcessHandler()
 
   if (! res || retVal )
     {
-    cmCTestLog(m_CTest, ERROR, "Error(s) when updating the project" << std::endl);
-    cmCTestLog(m_CTest, ERROR, "Output: " << goutput << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Error(s) when updating the project" << std::endl);
+    cmCTestLog(m_CTest, ERROR_MESSAGE, "Output: " << goutput << std::endl);
     return -1;
     }
   return count;

+ 22 - 22
Source/cmCTest.cxx

@@ -277,7 +277,7 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag)
       {
       if ( !cmSystemTools::FileIsDirectory(testingDir.c_str()) )
         {
-        cmCTestLog(this, ERROR, "File " << testingDir << " is in the place of the testing directory"
+        cmCTestLog(this, ERROR_MESSAGE, "File " << testingDir << " is in the place of the testing directory"
                   << std::endl);
         return 0;
         }
@@ -286,7 +286,7 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag)
       {
       if ( !cmSystemTools::MakeDirectory(testingDir.c_str()) )
         {
-        cmCTestLog(this, ERROR, "Cannot create directory " << testingDir
+        cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory " << testingDir
                   << std::endl);
         return 0;
         }
@@ -373,7 +373,7 @@ bool cmCTest::UpdateCTestConfiguration()
     }
   if ( !cmSystemTools::FileExists(fileName.c_str()) )
     {
-    cmCTestLog(this, ERROR, "Cannot find file: " << fileName.c_str() << std::endl);
+    cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName.c_str() << std::endl);
     return false;
     }
   // parse the dart test file
@@ -485,7 +485,7 @@ bool cmCTest::SetTest(const char* ttype, bool report)
     {
     if ( report )
       {
-      cmCTestLog(this, ERROR, "Don't know about test \"" << ttype << "\" yet..." << std::endl);
+      cmCTestLog(this, ERROR_MESSAGE, "Don't know about test \"" << ttype << "\" yet..." << std::endl);
       }
     return false;
     }
@@ -511,7 +511,7 @@ bool cmCTest::OpenOutputFile(const std::string& path,
     {
     if ( !cmSystemTools::FileIsDirectory(testingDir.c_str()) )
       {
-      cmCTestLog(this, ERROR, "File " << testingDir 
+      cmCTestLog(this, ERROR_MESSAGE, "File " << testingDir 
                 << " is in the place of the testing directory"
                 << std::endl);
       return false;
@@ -521,7 +521,7 @@ bool cmCTest::OpenOutputFile(const std::string& path,
     {
     if ( !cmSystemTools::MakeDirectory(testingDir.c_str()) )
       {
-      cmCTestLog(this, ERROR, "Cannot create directory " << testingDir
+      cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory " << testingDir
                 << std::endl);
       return false;
       }
@@ -530,7 +530,7 @@ bool cmCTest::OpenOutputFile(const std::string& path,
   stream.Open(filename.c_str());
   if( !stream )
     {
-    cmCTestLog(this, ERROR, "Problem opening file: " << filename << std::endl);
+    cmCTestLog(this, ERROR_MESSAGE, "Problem opening file: " << filename << std::endl);
     return false;
     }
   if ( compress )
@@ -981,7 +981,7 @@ int cmCTest::GenerateCTestNotesOutput(std::ostream& os, const cmCTest::tm_Vector
     else
       {
       os << "Problem reading file: " << it->c_str() << std::endl;
-      cmCTestLog(this, ERROR, "Problem reading file: " << it->c_str() << " while creating notes" << std::endl);
+      cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: " << it->c_str() << " while creating notes" << std::endl);
       }
     os << "</Text>\n"
       << "</Note>" << std::endl;
@@ -996,7 +996,7 @@ int cmCTest::GenerateNotesFile(const std::vector<cmStdString> &files)
   cmGeneratedFileStream ofs;
   if ( !this->OpenOutputFile(m_CurrentTag, "Notes.xml", ofs) )
     {
-    cmCTestLog(this, ERROR, "Cannot open notes file" << std::endl);
+    cmCTestLog(this, ERROR_MESSAGE, "Cannot open notes file" << std::endl);
     return 1;
     }
 
@@ -1276,8 +1276,8 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
       else
         {
         performSomeTest = false;
-        cmCTestLog(this, ERROR, "CTest -D called with incorrect option: " << targ << std::endl);
-        cmCTestLog(this, ERROR, "Available options are:" << std::endl
+        cmCTestLog(this, ERROR_MESSAGE, "CTest -D called with incorrect option: " << targ << std::endl);
+        cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
           << "  " << ctestExec << " -D Continuous" << std::endl
           << "  " << ctestExec << " -D Continuous(Start|Update|Configure|Build)" << std::endl
           << "  " << ctestExec << " -D Continuous(Test|Coverage|MemCheck|Submit)" << std::endl
@@ -1299,8 +1299,8 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
       if ( !this->SetTest(args[i].c_str(), false) )
         {
         performSomeTest = false;
-        cmCTestLog(this, ERROR, "CTest -T called with incorrect option: " << args[i].c_str() << std::endl);
-        cmCTestLog(this, ERROR, "Available options are:" << std::endl
+        cmCTestLog(this, ERROR_MESSAGE, "CTest -T called with incorrect option: " << args[i].c_str() << std::endl);
+        cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
           << "  " << ctestExec << " -T all" << std::endl
           << "  " << ctestExec << " -T start" << std::endl
           << "  " << ctestExec << " -T update" << std::endl
@@ -1334,8 +1334,8 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
       else
         {
         performSomeTest = false;
-        cmCTestLog(this, ERROR, "CTest -M called with incorrect option: " << str.c_str() << std::endl);
-        cmCTestLog(this, ERROR, "Available options are:" << std::endl
+        cmCTestLog(this, ERROR_MESSAGE, "CTest -M called with incorrect option: " << str.c_str() << std::endl);
+        cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
           << "  " << ctestExec << " -M Continuous" << std::endl
           << "  " << ctestExec << " -M Experimental" << std::endl
           << "  " << ctestExec << " -M Nightly" << std::endl);
@@ -1388,7 +1388,7 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
         }
       else
         {
-        cmCTestLog(this, ERROR, "--build-and-test must have source and binary dir" << std::endl);
+        cmCTestLog(this, ERROR_MESSAGE, "--build-and-test must have source and binary dir" << std::endl);
         }
       }
     if(arg.find("--build-target",0) == 0 && i < args.size() - 1)
@@ -1630,7 +1630,7 @@ int cmCTest::RunCMake(std::string* outstring, cmOStringStream &out,
       }
     else
       {
-      cmCTestLog(this, ERROR, out.str() << std::endl);
+      cmCTestLog(this, ERROR_MESSAGE, out.str() << std::endl);
       }
     return 1;
     }
@@ -1649,7 +1649,7 @@ int cmCTest::RunCMake(std::string* outstring, cmOStringStream &out,
         }
       else
         {
-        cmCTestLog(this, ERROR, out.str() << std::endl);
+        cmCTestLog(this, ERROR_MESSAGE, out.str() << std::endl);
         }
       return 1;
       }
@@ -1838,7 +1838,7 @@ int cmCTest::RunCMakeAndTest(std::string* outstring)
       }
     else
       {
-      cmCTestLog(this, ERROR, out.str());
+      cmCTestLog(this, ERROR_MESSAGE, out.str());
       }
     // return to the original directory
     cmSystemTools::ChangeDirectory(cwd.c_str());
@@ -1916,7 +1916,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir)
       (!lg->GetMakefile()->ReadListFile(0, fname.c_str()) ||
        cmSystemTools::GetErrorOccuredFlag() ) )
       {
-      cmCTestLog(this, ERROR, "Problem reading custom configuration" << std::endl);
+      cmCTestLog(this, ERROR_MESSAGE, "Problem reading custom configuration" << std::endl);
       }
     dirs.erase(dirs.end()-1, dirs.end());
     cmSystemTools::SimpleGlob(rexpr, ndirs, -1);
@@ -2102,7 +2102,7 @@ static const char* cmCTestStringLogType[] =
   "HANDLER_OUTPUT",
   "HANDLER_VERBOSE_OUTPUT",
   "WARNING",
-  "ERROR",
+  "ERROR_MESSAGE",
   0
 };
 
@@ -2176,7 +2176,7 @@ void cmCTest::Log(int logType, const char* msg)
       std::cerr << msg;
       std::cerr.flush();
       break;
-    case ERROR:
+    case ERROR_MESSAGE:
       std::cerr << msg;
       std::cerr.flush();
       break;

+ 1 - 1
Source/cmCTest.h

@@ -232,7 +232,7 @@ public:
     HANDLER_OUTPUT,
     HANDLER_VERBOSE_OUTPUT,
     WARNING,
-    ERROR,
+    ERROR_MESSAGE,
     OTHER
   };
 

+ 2 - 2
Source/ctest.cxx

@@ -168,7 +168,7 @@ int main (int argc, char *argv[])
 
   if ( cmSystemTools::GetCurrentWorkingDirectory().size() == 0 )
     {
-    cmCTestLog(&inst, ERROR, "Current working directory cannot be established." << std::endl);
+    cmCTestLog(&inst, ERROR_MESSAGE, "Current working directory cannot be established." << std::endl);
     nocwd = 1;
     }
 
@@ -182,7 +182,7 @@ int main (int argc, char *argv[])
     {
     if(argc == 1)
       {
-      cmCTestLog(&inst, ERROR, "*********************************" << std::endl
+      cmCTestLog(&inst, ERROR_MESSAGE, "*********************************" << std::endl
         << "No test configuration file found!" << std::endl
         << "*********************************" << std::endl);
       }