1
0

cmParsePythonCoverage.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc.
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmParsePythonCoverage_h
  11. #define cmParsePythonCoverage_h
  12. #include "cmStandardIncludes.h"
  13. #include "cmCTestCoverageHandler.h"
  14. /** \class cmParsePythonCoverage
  15. * \brief Parse coverage.py Python coverage information
  16. *
  17. * This class is used to parse the output of the coverage.py tool that
  18. * is currently maintained by Ned Batchelder. That tool has a command
  19. * that produces xml output in the format typically output by the common
  20. * Java-based Cobertura coverage application. This helper class parses
  21. * that XML file to fill the coverage-handler container.
  22. */
  23. class cmParsePythonCoverage
  24. {
  25. public:
  26. //! Create the coverage parser by passing in the coverage handler
  27. //! container and the cmCTest object
  28. cmParsePythonCoverage(cmCTestCoverageHandlerContainer& cont,
  29. cmCTest* ctest);
  30. //! Read the XML produced by running `coverage xml`
  31. bool ReadCoverageXML(const char* xmlFile);
  32. private:
  33. class XMLParser;
  34. cmCTestCoverageHandlerContainer& Coverage;
  35. cmCTest* CTest;
  36. std::string CurFileName;
  37. };
  38. #endif