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