cmCTestTestCommand.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 cmCTestTestCommand_h
  4. #define cmCTestTestCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmCTestHandlerCommand.h"
  7. #include "cmCommand.h"
  8. #include <string>
  9. #include <utility>
  10. #include "cm_memory.hxx"
  11. class cmCTestGenericHandler;
  12. /** \class cmCTestTest
  13. * \brief Run a ctest script
  14. *
  15. * cmCTestTestCommand defineds the command to test the project.
  16. */
  17. class cmCTestTestCommand : public cmCTestHandlerCommand
  18. {
  19. public:
  20. cmCTestTestCommand();
  21. /**
  22. * This is a virtual constructor for the command.
  23. */
  24. std::unique_ptr<cmCommand> Clone() override
  25. {
  26. auto ni = cm::make_unique<cmCTestTestCommand>();
  27. ni->CTest = this->CTest;
  28. ni->CTestScriptHandler = this->CTestScriptHandler;
  29. return std::unique_ptr<cmCommand>(std::move(ni));
  30. }
  31. /**
  32. * The name of the command as specified in CMakeList.txt.
  33. */
  34. std::string GetName() const override { return "ctest_test"; }
  35. protected:
  36. virtual cmCTestGenericHandler* InitializeActualHandler();
  37. cmCTestGenericHandler* InitializeHandler() override;
  38. enum
  39. {
  40. ctt_BUILD = ct_LAST,
  41. ctt_RETURN_VALUE,
  42. ctt_START,
  43. ctt_END,
  44. ctt_STRIDE,
  45. ctt_EXCLUDE,
  46. ctt_INCLUDE,
  47. ctt_EXCLUDE_LABEL,
  48. ctt_INCLUDE_LABEL,
  49. ctt_EXCLUDE_FIXTURE,
  50. ctt_EXCLUDE_FIXTURE_SETUP,
  51. ctt_EXCLUDE_FIXTURE_CLEANUP,
  52. ctt_PARALLEL_LEVEL,
  53. ctt_SCHEDULE_RANDOM,
  54. ctt_STOP_TIME,
  55. ctt_TEST_LOAD,
  56. ctt_LAST
  57. };
  58. };
  59. #endif