cmCTestSubmitCommand.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. ArgumentDoingSubmitURL,
  63. ArgumentDoingLast2
  64. };
  65. bool PartsMentioned;
  66. std::set<cmCTest::Part> Parts;
  67. bool FilesMentioned;
  68. bool InternalTest;
  69. cmCTest::SetOfStrings Files;
  70. std::string RetryCount;
  71. std::string RetryDelay;
  72. bool CDashUpload;
  73. std::string CDashUploadFile;
  74. std::string CDashUploadType;
  75. std::vector<std::string> HttpHeaders;
  76. std::string SubmitURL;
  77. };
  78. #endif