ctest_submit.rst 3.3 KB

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