cmCTestSubmitCommand.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 cmCTestSubmitCommand_h
  11. #define cmCTestSubmitCommand_h
  12. #include "cmCTestHandlerCommand.h"
  13. #include "cmCTest.h"
  14. /** \class cmCTestSubmit
  15. * \brief Run a ctest script
  16. *
  17. * cmCTestSubmitCommand defineds the command to submit the test results for
  18. * the project.
  19. */
  20. class cmCTestSubmitCommand : public cmCTestHandlerCommand
  21. {
  22. public:
  23. cmCTestSubmitCommand()
  24. {
  25. this->PartsMentioned = false;
  26. this->FilesMentioned = false;
  27. }
  28. /**
  29. * This is a virtual constructor for the command.
  30. */
  31. virtual cmCommand* Clone()
  32. {
  33. cmCTestSubmitCommand* ni = new cmCTestSubmitCommand;
  34. ni->CTest = this->CTest;
  35. ni->CTestScriptHandler = this->CTestScriptHandler;
  36. return ni;
  37. }
  38. /**
  39. * The name of the command as specified in CMakeList.txt.
  40. */
  41. virtual const char* GetName() { return "ctest_submit";}
  42. /**
  43. * Succinct documentation.
  44. */
  45. virtual const char* GetTerseDocumentation()
  46. {
  47. return "Submit results to a dashboard server.";
  48. }
  49. /**
  50. * More documentation.
  51. */
  52. virtual const char* GetFullDocumentation()
  53. {
  54. return
  55. " ctest_submit([PARTS ...] [FILES ...] [RETURN_VALUE res])\n"
  56. "By default all available parts are submitted if no PARTS or FILES "
  57. "are specified. "
  58. "The PARTS option lists a subset of parts to be submitted. "
  59. "Valid part names are:\n"
  60. " Start = nothing\n"
  61. " Update = ctest_update results, in Update.xml\n"
  62. " Configure = ctest_configure results, in Configure.xml\n"
  63. " Build = ctest_build results, in Build.xml\n"
  64. " Test = ctest_test results, in Test.xml\n"
  65. " Coverage = ctest_coverage results, in Coverage.xml\n"
  66. " MemCheck = ctest_memcheck results, in DynamicAnalysis.xml\n"
  67. " Notes = Files listed by CTEST_NOTES_FILES, in Notes.xml\n"
  68. " ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES\n"
  69. " Submit = nothing\n"
  70. "The FILES option explicitly lists specific files to be submitted. "
  71. "Each individual file must exist at the time of the call.\n";
  72. }
  73. cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand);
  74. protected:
  75. cmCTestGenericHandler* InitializeHandler();
  76. virtual bool CheckArgumentKeyword(std::string const& arg);
  77. virtual bool CheckArgumentValue(std::string const& arg);
  78. enum
  79. {
  80. ArgumentDoingParts = Superclass::ArgumentDoingLast1,
  81. ArgumentDoingFiles,
  82. ArgumentDoingLast2
  83. };
  84. bool PartsMentioned;
  85. std::set<cmCTest::Part> Parts;
  86. bool FilesMentioned;
  87. cmCTest::SetOfStrings Files;
  88. };
  89. #endif