ctest_submit.rst 4.1 KB

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