[Cmake-commits] [cmake-commits] zach.mullen committed cmCTestTestHandler.cxx 1.134 1.135 cmCTestTestHandler.h 1.54 1.55

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Dec 16 14:50:18 EST 2009


Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv14318/CTest

Modified Files:
	cmCTestTestHandler.cxx cmCTestTestHandler.h 
Log Message:
Added an option to conditionally attach files to a test submission only if the test does not pass.  Also some preliminary changes for test output compression.


Index: cmCTestTestHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestTestHandler.cxx,v
retrieving revision 1.134
retrieving revision 1.135
diff -C 2 -d -r1.134 -r1.135
*** cmCTestTestHandler.cxx	15 Dec 2009 19:24:24 -0000	1.134
--- cmCTestTestHandler.cxx	16 Dec 2009 19:50:16 -0000	1.135
***************
*** 1260,1263 ****
--- 1260,1271 ----
                                       cmCTestTestResult* result)
  {
+   if(result->Status != cmCTestTestHandler::COMPLETED
+      && result->Properties->AttachOnFail.size())
+     {
+     result->Properties->AttachedFiles.insert(
+       result->Properties->AttachedFiles.end(),
+       result->Properties->AttachOnFail.begin(),
+       result->Properties->AttachOnFail.end());
+     }
    for(std::vector<std::string>::const_iterator file = 
        result->Properties->AttachedFiles.begin();
***************
*** 1269,1275 ****
        "compression=\"tar/gzip\" filename=\"" << fname << "\" type=\"file\">"
        "\n\t\t\t<Value>\n\t\t\t"
!      << base64
!      << "\n\t\t\t</Value>\n\t\t</NamedMeasurement>\n";
!     } 
  }
  
--- 1277,1283 ----
        "compression=\"tar/gzip\" filename=\"" << fname << "\" type=\"file\">"
        "\n\t\t\t<Value>\n\t\t\t"
!       << base64
!       << "\n\t\t\t</Value>\n\t\t</NamedMeasurement>\n";
!     }
  }
  
***************
*** 1356,1360 ****
                      std::string filepath,
                      std::string &filename)
! {   
    std::string tempPath;
  
--- 1364,1368 ----
                      std::string filepath,
                      std::string &filename)
! {
    std::string tempPath;
  
***************
*** 2078,2081 ****
--- 2086,2100 ----
                }
              }
+           if ( key == "ATTACHED_FILES_ON_FAIL" )
+             {
+             std::vector<std::string> lval;
+             cmSystemTools::ExpandListArgument(val.c_str(), lval);
+ 
+             for(std::vector<std::string>::iterator f = lval.begin();
+                 f != lval.end(); ++f)
+               {
+               rtit->AttachOnFail.push_back(*f);
+               }
+             }
            if ( key == "TIMEOUT" )
              {

Index: cmCTestTestHandler.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestTestHandler.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -C 2 -d -r1.54 -r1.55
*** cmCTestTestHandler.h	15 Dec 2009 19:24:24 -0000	1.54
--- cmCTestTestHandler.h	16 Dec 2009 19:50:16 -0000	1.55
***************
*** 88,91 ****
--- 88,92 ----
      std::vector<std::string> Depends;
      std::vector<std::string> AttachedFiles;
+     std::vector<std::string> AttachOnFail;
      std::vector<std::pair<cmsys::RegularExpression,
                            std::string> > ErrorRegularExpressions;



More information about the Cmake-commits mailing list