cmCTestSubmitCommand.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmCTestSubmitCommand_h
  14. #define cmCTestSubmitCommand_h
  15. #include "cmCTestHandlerCommand.h"
  16. #include "cmCTest.h"
  17. /** \class cmCTestSubmit
  18. * \brief Run a ctest script
  19. *
  20. * cmCTestSubmitCommand defineds the command to submit the test results for
  21. * the project.
  22. */
  23. class cmCTestSubmitCommand : public cmCTestHandlerCommand
  24. {
  25. public:
  26. cmCTestSubmitCommand() {}
  27. /**
  28. * This is a virtual constructor for the command.
  29. */
  30. virtual cmCommand* Clone()
  31. {
  32. cmCTestSubmitCommand* ni = new cmCTestSubmitCommand;
  33. ni->CTest = this->CTest;
  34. ni->CTestScriptHandler = this->CTestScriptHandler;
  35. return ni;
  36. }
  37. /**
  38. * The name of the command as specified in CMakeList.txt.
  39. */
  40. virtual const char* GetName() { return "ctest_submit";}
  41. /**
  42. * Succinct documentation.
  43. */
  44. virtual const char* GetTerseDocumentation()
  45. {
  46. return "Submits the repository.";
  47. }
  48. /**
  49. * More documentation.
  50. */
  51. virtual const char* GetFullDocumentation()
  52. {
  53. return
  54. " ctest_submit([RETURN_VALUE res] [PARTS ...])\n"
  55. "Submits the test results for the project. "
  56. "By default all available parts are submitted. "
  57. "The PARTS option lists a subset of parts to be submitted.";
  58. }
  59. cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand);
  60. protected:
  61. cmCTestGenericHandler* InitializeHandler();
  62. virtual bool CheckArgumentKeyword(std::string const& arg);
  63. virtual bool CheckArgumentValue(std::string const& arg);
  64. enum
  65. {
  66. ArgumentDoingParts = Superclass::ArgumentDoingLast1,
  67. ArgumentDoingLast2
  68. };
  69. std::set<cmCTest::Part> Parts;
  70. };
  71. #endif