cmCTestMemCheckCommand.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  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 cmCTestMemCheckCommand_h
  11. #define cmCTestMemCheckCommand_h
  12. #include "cmCTestTestCommand.h"
  13. class cmCTestGenericHandler;
  14. /** \class cmCTestMemCheck
  15. * \brief Run a ctest script
  16. *
  17. * cmCTestMemCheckCommand defineds the command to test the project.
  18. */
  19. class cmCTestMemCheckCommand : public cmCTestTestCommand
  20. {
  21. public:
  22. cmCTestMemCheckCommand() {}
  23. /**
  24. * This is a virtual constructor for the command.
  25. */
  26. virtual cmCommand* Clone()
  27. {
  28. cmCTestMemCheckCommand* ni = new cmCTestMemCheckCommand;
  29. ni->CTest = this->CTest;
  30. ni->CTestScriptHandler = this->CTestScriptHandler;
  31. return ni;
  32. }
  33. /**
  34. * The name of the command as specified in CMakeList.txt.
  35. */
  36. virtual const char* GetName() const { return "ctest_memcheck";}
  37. /**
  38. * Succinct documentation.
  39. */
  40. virtual const char* GetTerseDocumentation() const
  41. {
  42. return "Run tests with a dynamic analysis tool.";
  43. }
  44. /**
  45. * More documentation.
  46. */
  47. virtual const char* GetFullDocumentation() const
  48. {
  49. return
  50. " ctest_memcheck([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n"
  51. " [START start number] [END end number]\n"
  52. " [STRIDE stride number] [EXCLUDE exclude regex ]\n"
  53. " [INCLUDE include regex] \n"
  54. " [EXCLUDE_LABEL exclude regex] \n"
  55. " [INCLUDE_LABEL label regex] \n"
  56. " [PARALLEL_LEVEL level] )\n"
  57. "Tests the given build directory and stores results in MemCheck.xml. "
  58. "The second argument is a variable that will hold value. Optionally, "
  59. "you can specify the starting test number START, the ending test number "
  60. "END, the number of tests to skip between each test STRIDE, a regular "
  61. "expression for tests to run INCLUDE, or a regular expression for tests "
  62. "not to run EXCLUDE. EXCLUDE_LABEL and INCLUDE_LABEL are regular "
  63. "expressions for tests to be included or excluded by the test "
  64. "property LABEL. PARALLEL_LEVEL should be set to a positive number "
  65. "representing the number of tests to be run in parallel."
  66. "\n"
  67. CTEST_COMMAND_APPEND_OPTION_DOCS;
  68. }
  69. cmTypeMacro(cmCTestMemCheckCommand, cmCTestTestCommand);
  70. protected:
  71. cmCTestGenericHandler* InitializeActualHandler();
  72. };
  73. #endif