cmake/Help/command/ctest_submit.rst

132 lines
4.0 KiB
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
ctest_submit
------------
2015-08-17 11:37:30 +02:00
Perform the :ref:`CTest Submit Step` as a :ref:`Dashboard Client`.
2014-08-03 19:52:23 +02:00
::
2015-08-17 11:37:30 +02:00
ctest_submit([PARTS <part>...] [FILES <file>...]
2019-11-11 23:01:05 +01:00
[SUBMIT_URL <url>]
[BUILD_ID <result-var>]
2017-07-20 19:35:53 +02:00
[HTTPHEADER <header>]
2015-08-17 11:37:30 +02:00
[RETRY_COUNT <count>]
[RETRY_DELAY <delay>]
[RETURN_VALUE <result-var>]
2018-10-28 12:09:07 +01:00
[CAPTURE_CMAKE_ERROR <result-var>]
2015-08-17 11:37:30 +02:00
[QUIET]
2015-04-27 22:25:09 +02:00
)
2014-08-03 19:52:23 +02:00
2015-08-17 11:37:30 +02:00
Submit results to a dashboard server.
By default all available parts are submitted.
2014-08-03 19:52:23 +02:00
2015-08-17 11:37:30 +02:00
The options are:
``PARTS <part>...``
Specify a subset of parts to submit. Valid part names are::
Start = nothing
Update = ctest_update results, in Update.xml
Configure = ctest_configure results, in Configure.xml
Build = ctest_build results, in Build.xml
Test = ctest_test results, in Test.xml
Coverage = ctest_coverage results, in Coverage.xml
2021-11-20 13:41:27 +01:00
MemCheck = ctest_memcheck results, in DynamicAnalysis.xml and
DynamicAnalysis-Test.xml
2015-08-17 11:37:30 +02:00
Notes = Files listed by CTEST_NOTES_FILES, in Notes.xml
ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES
Upload = Files prepared for upload by ctest_upload(), in Upload.xml
Submit = nothing
2019-11-11 23:01:05 +01:00
Done = Build is complete, in Done.xml
2015-08-17 11:37:30 +02:00
``FILES <file>...``
Specify an explicit list of specific files to be submitted.
Each individual file must exist at the time of the call.
2019-11-11 23:01:05 +01:00
``SUBMIT_URL <url>``
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.14
2019-11-11 23:01:05 +01:00
The ``http`` or ``https`` URL of the dashboard server to send the submission
to. If not given, the :variable:`CTEST_SUBMIT_URL` variable is used.
``BUILD_ID <result-var>``
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.15
2019-11-11 23:01:05 +01:00
Store in the ``<result-var>`` variable the ID assigned to this build by
CDash.
2017-07-20 19:35:53 +02:00
``HTTPHEADER <HTTP-header>``
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.9
2017-07-20 19:35:53 +02:00
Specify HTTP header to be included in the request to CDash during submission.
2019-11-11 23:01:05 +01:00
For example, CDash can be configured to only accept submissions from
authenticated clients. In this case, you should provide a bearer token in your
header:
.. code-block:: cmake
ctest_submit(HTTPHEADER "Authorization: Bearer <auth-token>")
This suboption can be repeated several times for multiple headers.
2017-07-20 19:35:53 +02:00
2015-08-17 11:37:30 +02:00
``RETRY_COUNT <count>``
Specify how many times to retry a timed-out submission.
``RETRY_DELAY <delay>``
Specify how long (in seconds) to wait after a timed-out submission
before attempting to re-submit.
``RETURN_VALUE <result-var>``
Store in the ``<result-var>`` variable ``0`` for success and
non-zero on failure.
2014-08-03 19:52:23 +02:00
2018-10-28 12:09:07 +01:00
``CAPTURE_CMAKE_ERROR <result-var>``
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.13
2018-10-28 12:09:07 +01:00
Store in the ``<result-var>`` variable -1 if there are any errors running
the command and prevent ctest from returning non-zero if an error occurs.
2015-08-17 11:37:30 +02:00
``QUIET``
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.3
2015-08-17 11:37:30 +02:00
Suppress all non-error messages that would have otherwise been
printed to the console.
2015-04-27 22:25:09 +02:00
Submit to CDash Upload API
^^^^^^^^^^^^^^^^^^^^^^^^^^
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.2
2015-04-27 22:25:09 +02:00
::
2017-04-14 19:02:05 +02:00
ctest_submit(CDASH_UPLOAD <file> [CDASH_UPLOAD_TYPE <type>]
2019-11-11 23:01:05 +01:00
[SUBMIT_URL <url>]
2021-09-14 00:13:48 +02:00
[BUILD_ID <result-var>]
2017-07-20 19:35:53 +02:00
[HTTPHEADER <header>]
2017-04-14 19:02:05 +02:00
[RETRY_COUNT <count>]
[RETRY_DELAY <delay>]
2018-10-28 12:09:07 +01:00
[RETURN_VALUE <result-var>]
2017-04-14 19:02:05 +02:00
[QUIET])
2015-04-27 22:25:09 +02:00
This second signature is used to upload files to CDash via the CDash
2018-08-09 18:06:22 +02:00
file upload API. The API first sends a request to upload to CDash along
2015-04-27 22:25:09 +02:00
with a content hash of the file. If CDash does not already have the file,
then it is uploaded. Along with the file, a CDash type string is specified
to tell CDash which handler to use to process the data.
2017-04-14 19:02:05 +02:00
2021-09-14 00:13:48 +02:00
This signature interprets options in the same way as the first one.
.. versionadded:: 3.8
Added the ``RETRY_COUNT``, ``RETRY_DELAY``, ``QUIET`` options.
.. versionadded:: 3.9
Added the ``HTTPHEADER`` option.
.. versionadded:: 3.13
Added the ``RETURN_VALUE`` option.
.. versionadded:: 3.14
Added the ``SUBMIT_URL`` option.
.. versionadded:: 3.15
Added the ``BUILD_ID`` option.