ctest_submit.rst 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ctest_submit
  2. ------------
  3. Perform the :ref:`CTest Submit Step` as a :ref:`Dashboard Client`.
  4. .. code-block:: cmake
  5. ctest_submit([PARTS <part>...] [FILES <file>...]
  6. [SUBMIT_URL <url>]
  7. [BUILD_ID <result-var>]
  8. [HTTPHEADER <header>]
  9. [RETRY_COUNT <count>]
  10. [RETRY_DELAY <delay>]
  11. [RETURN_VALUE <result-var>]
  12. [CAPTURE_CMAKE_ERROR <result-var>]
  13. [QUIET]
  14. )
  15. Submit results to a dashboard server.
  16. By default all available parts are submitted.
  17. The options are:
  18. ``PARTS <part>...``
  19. Specify a subset of parts to submit. Valid part names are::
  20. Start = nothing
  21. Update = ctest_update results, in Update.xml
  22. Configure = ctest_configure results, in Configure.xml
  23. Build = ctest_build results, in Build.xml
  24. Test = ctest_test results, in Test.xml
  25. Coverage = ctest_coverage results, in Coverage.xml
  26. MemCheck = ctest_memcheck results, in DynamicAnalysis.xml and
  27. DynamicAnalysis-Test.xml
  28. Notes = Files listed by CTEST_NOTES_FILES, in Notes.xml
  29. ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES
  30. Upload = Files prepared for upload by ctest_upload(), in Upload.xml
  31. Submit = nothing
  32. Done = Build is complete, in Done.xml
  33. ``FILES <file>...``
  34. Specify an explicit list of specific files to be submitted.
  35. Each individual file must exist at the time of the call.
  36. ``SUBMIT_URL <url>``
  37. .. versionadded:: 3.14
  38. The ``http`` or ``https`` URL of the dashboard server to send the submission
  39. to. If not given, the :variable:`CTEST_SUBMIT_URL` variable is used.
  40. ``BUILD_ID <result-var>``
  41. .. versionadded:: 3.15
  42. Store in the ``<result-var>`` variable the ID assigned to this build by
  43. CDash.
  44. ``HTTPHEADER <HTTP-header>``
  45. .. versionadded:: 3.9
  46. Specify HTTP header to be included in the request to CDash during submission.
  47. For example, CDash can be configured to only accept submissions from
  48. authenticated clients. In this case, you should provide a bearer token in your
  49. header:
  50. .. code-block:: cmake
  51. ctest_submit(HTTPHEADER "Authorization: Bearer <auth-token>")
  52. This suboption can be repeated several times for multiple headers.
  53. ``RETRY_COUNT <count>``
  54. Specify how many times to retry a timed-out submission.
  55. ``RETRY_DELAY <delay>``
  56. Specify how long (in seconds) to wait after a timed-out submission
  57. before attempting to re-submit.
  58. ``RETURN_VALUE <result-var>``
  59. Store in the ``<result-var>`` variable ``0`` for success and
  60. non-zero on failure.
  61. ``CAPTURE_CMAKE_ERROR <result-var>``
  62. .. versionadded:: 3.13
  63. Store in the ``<result-var>`` variable -1 if there are any errors running
  64. the command and prevent ctest from returning non-zero if an error occurs.
  65. ``QUIET``
  66. .. versionadded:: 3.3
  67. Suppress all non-error messages that would have otherwise been
  68. printed to the console.
  69. Submit to CDash Upload API
  70. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  71. .. versionadded:: 3.2
  72. .. code-block:: cmake
  73. ctest_submit(CDASH_UPLOAD <file> [CDASH_UPLOAD_TYPE <type>]
  74. [SUBMIT_URL <url>]
  75. [BUILD_ID <result-var>]
  76. [HTTPHEADER <header>]
  77. [RETRY_COUNT <count>]
  78. [RETRY_DELAY <delay>]
  79. [RETURN_VALUE <result-var>]
  80. [QUIET])
  81. This second signature is used to upload files to CDash via the CDash
  82. file upload API. The API first sends a request to upload to CDash along
  83. with a content hash of the file. If CDash does not already have the file,
  84. then it is uploaded. Along with the file, a CDash type string is specified
  85. to tell CDash which handler to use to process the data.
  86. This signature interprets options in the same way as the first one.
  87. .. versionadded:: 3.8
  88. Added the ``RETRY_COUNT``, ``RETRY_DELAY``, ``QUIET`` options.
  89. .. versionadded:: 3.9
  90. Added the ``HTTPHEADER`` option.
  91. .. versionadded:: 3.13
  92. Added the ``RETURN_VALUE`` option.
  93. .. versionadded:: 3.14
  94. Added the ``SUBMIT_URL`` option.
  95. .. versionadded:: 3.15
  96. Added the ``BUILD_ID`` option.