1
0

cmCTestSubmitCommand.h 3.2 KB

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