ctest_submit.rst 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ctest_submit
  2. ------------
  3. Perform the :ref:`CTest Submit Step` as a :ref:`Dashboard Client`.
  4. ::
  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
  27. Notes = Files listed by CTEST_NOTES_FILES, in Notes.xml
  28. ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES
  29. Upload = Files prepared for upload by ctest_upload(), in Upload.xml
  30. Submit = nothing
  31. Done = Build is complete, in Done.xml
  32. ``FILES <file>...``
  33. Specify an explicit list of specific files to be submitted.
  34. Each individual file must exist at the time of the call.
  35. ``SUBMIT_URL <url>``
  36. The ``http`` or ``https`` URL of the dashboard server to send the submission
  37. to. If not given, the :variable:`CTEST_SUBMIT_URL` variable is used.
  38. ``BUILD_ID <result-var>``
  39. Store in the ``<result-var>`` variable the ID assigned to this build by
  40. CDash.
  41. ``HTTPHEADER <HTTP-header>``
  42. Specify HTTP header to be included in the request to CDash during submission.
  43. For example, CDash can be configured to only accept submissions from
  44. authenticated clients. In this case, you should provide a bearer token in your
  45. header:
  46. .. code-block:: cmake
  47. ctest_submit(HTTPHEADER "Authorization: Bearer <auth-token>")
  48. This suboption can be repeated several times for multiple headers.
  49. ``RETRY_COUNT <count>``
  50. Specify how many times to retry a timed-out submission.
  51. ``RETRY_DELAY <delay>``
  52. Specify how long (in seconds) to wait after a timed-out submission
  53. before attempting to re-submit.
  54. ``RETURN_VALUE <result-var>``
  55. Store in the ``<result-var>`` variable ``0`` for success and
  56. non-zero on failure.
  57. ``CAPTURE_CMAKE_ERROR <result-var>``
  58. Store in the ``<result-var>`` variable -1 if there are any errors running
  59. the command and prevent ctest from returning non-zero if an error occurs.
  60. ``QUIET``
  61. Suppress all non-error messages that would have otherwise been
  62. printed to the console.
  63. Submit to CDash Upload API
  64. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  65. ::
  66. ctest_submit(CDASH_UPLOAD <file> [CDASH_UPLOAD_TYPE <type>]
  67. [SUBMIT_URL <url>]
  68. [HTTPHEADER <header>]
  69. [RETRY_COUNT <count>]
  70. [RETRY_DELAY <delay>]
  71. [RETURN_VALUE <result-var>]
  72. [QUIET])
  73. This second signature is used to upload files to CDash via the CDash
  74. file upload API. The API first sends a request to upload to CDash along
  75. with a content hash of the file. If CDash does not already have the file,
  76. then it is uploaded. Along with the file, a CDash type string is specified
  77. to tell CDash which handler to use to process the data.
  78. This signature accepts the ``SUBMIT_URL``, ``BUILD_ID``, ``HTTPHEADER``,
  79. ``RETRY_COUNT``, ``RETRY_DELAY``, ``RETURN_VALUE`` and ``QUIET`` options
  80. as described above.