cmCTestSubmitCommand.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmCTestSubmitCommand_h
  4. #define cmCTestSubmitCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmCTest.h"
  7. #include "cmCTestHandlerCommand.h"
  8. #include <set>
  9. #include <string>
  10. #include <vector>
  11. class cmCTestGenericHandler;
  12. class cmCommand;
  13. class cmExecutionStatus;
  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. this->InternalTest = false;
  28. this->RetryCount = "";
  29. this->RetryDelay = "";
  30. this->CDashUpload = false;
  31. }
  32. /**
  33. * This is a virtual constructor for the command.
  34. */
  35. cmCommand* Clone() override
  36. {
  37. cmCTestSubmitCommand* ni = new cmCTestSubmitCommand;
  38. ni->CTest = this->CTest;
  39. ni->CTestScriptHandler = this->CTestScriptHandler;
  40. return ni;
  41. }
  42. bool InitialPass(std::vector<std::string> const& args,
  43. cmExecutionStatus& status) override;
  44. /**
  45. * The name of the command as specified in CMakeList.txt.
  46. */
  47. std::string GetName() const override { return "ctest_submit"; }
  48. typedef cmCTestHandlerCommand Superclass;
  49. protected:
  50. cmCTestGenericHandler* InitializeHandler() override;
  51. bool CheckArgumentKeyword(std::string const& arg) override;
  52. bool CheckArgumentValue(std::string const& arg) override;
  53. enum
  54. {
  55. ArgumentDoingParts = Superclass::ArgumentDoingLast1,
  56. ArgumentDoingFiles,
  57. ArgumentDoingRetryDelay,
  58. ArgumentDoingRetryCount,
  59. ArgumentDoingCDashUpload,
  60. ArgumentDoingCDashUploadType,
  61. ArgumentDoingHttpHeader,
  62. ArgumentDoingLast2
  63. };
  64. bool PartsMentioned;
  65. std::set<cmCTest::Part> Parts;
  66. bool FilesMentioned;
  67. bool InternalTest;
  68. cmCTest::SetOfStrings Files;
  69. std::string RetryCount;
  70. std::string RetryDelay;
  71. bool CDashUpload;
  72. std::string CDashUploadFile;
  73. std::string CDashUploadType;
  74. std::vector<std::string> HttpHeaders;
  75. };
  76. #endif