[Cmake-commits] [cmake-commits] king committed cmCTestTestHandler.cxx 1.84 1.85 cmCTestTestHandler.h 1.31 1.32

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jan 7 10:41:39 EST 2009


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

Modified Files:
	cmCTestTestHandler.cxx cmCTestTestHandler.h 
Log Message:
ENH: Teach CTest to submit test property LABELS

This teaches CTest to send the test property "LABELS" in Test.xml
dashboard submissions as Label elements inside a Labels element.


Index: cmCTestTestHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestTestHandler.cxx,v
retrieving revision 1.84
retrieving revision 1.85
diff -C 2 -d -r1.84 -r1.85
*** cmCTestTestHandler.cxx	19 Dec 2008 15:19:37 -0000	1.84
--- cmCTestTestHandler.cxx	7 Jan 2009 15:41:37 -0000	1.85
***************
*** 1225,1228 ****
--- 1225,1236 ----
        p.Environment.push_back(line);
        }
+     int numLabels = 0;
+     ok = ok && this->GetValue("Labels:",
+                               numLabels, fin);
+     for(int j =0; j < numLabels; j++)
+       {
+       cmSystemTools::GetLineFromStream(fin, line);
+       p.Labels.push_back(line);
+       }
      if(!ok)
        {
***************
*** 1317,1320 ****
--- 1325,1335 ----
        fout << *e << "\n";
        }
+     fout << "Labels:\n" <<
+       p.Labels.size() << "\n";
+     for(std::vector<std::string>::const_iterator e =
+           p.Labels.begin(); e != p.Labels.end(); ++e)
+       {
+       fout << *e << "\n";
+       }
      }
    fout.close();
***************
*** 1514,1518 ****
        << "</Value>\n"
        << "\t\t\t</Measurement>\n"
!       << "\t\t</Results>\n"
        << "\t</Test>" << std::endl;
      }
--- 1529,1547 ----
        << "</Value>\n"
        << "\t\t\t</Measurement>\n"
!       << "\t\t</Results>\n";
! 
!     if(!result->Properties->Labels.empty())
!       {
!       os << "\t\t<Labels>\n";
!       std::vector<std::string> const& labels = result->Properties->Labels;
!       for(std::vector<std::string>::const_iterator li = labels.begin();
!           li != labels.end(); ++li)
!         {
!         os << "\t\t\t<Label>" << cmCTest::MakeXMLSafe(*li) << "</Label>\n";
!         }
!       os << "\t\t</Labels>\n";
!       }
! 
!     os
        << "\t</Test>" << std::endl;
      }
***************
*** 2307,2310 ****
--- 2336,2349 ----
                }
              }
+           if ( key == "LABELS" )
+             {
+             std::vector<std::string> lval;
+             cmSystemTools::ExpandListArgument(val.c_str(), lval);
+             std::vector<std::string>::iterator crit;
+             for ( crit = lval.begin(); crit != lval.end(); ++ crit )
+               {
+               rtit->Labels.push_back(*crit);
+               }
+             }
            if ( key == "MEASUREMENT" )
              {

Index: cmCTestTestHandler.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestTestHandler.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -C 2 -d -r1.31 -r1.32
*** cmCTestTestHandler.h	19 Dec 2008 02:59:25 -0000	1.31
--- cmCTestTestHandler.h	7 Jan 2009 15:41:37 -0000	1.32
***************
*** 96,99 ****
--- 96,100 ----
      int Index;
      std::vector<std::string> Environment;
+     std::vector<std::string> Labels;
    };
  



More information about the Cmake-commits mailing list