1ctest(1) General Commands Manual ctest(1)
2
3
4
6 ctest - Testing driver provided by CMake.
7
9 ctest [options]
10
12 The "ctest" executable is the CMake test driver program. CMake-gener‐
13 ated build trees created for projects that use the ENABLE_TESTING and
14 ADD_TEST commands have testing support. This program will run the
15 tests and report results.
16
17
19 -C <cfg>, --build-config <cfg>
20 Choose configuration to test.
21
22 Some CMake-generated build trees can have multiple build config‐
23 urations in the same tree. This option can be used to specify
24 which one should be tested. Example configurations are "Debug"
25 and "Release".
26
27
28 -V,--verbose
29 Enable verbose output from tests.
30
31 Test output is normally suppressed and only summary information
32 is displayed. This option will show all test output.
33
34
35 -VV,--extra-verbose
36 Enable more verbose output from tests.
37
38 Test output is normally suppressed and only summary information
39 is displayed. This option will show even more test output.
40
41
42 --debug
43 Displaying more verbose internals of CTest.
44
45 This feature will result in large number of output that is
46 mostly useful for debugging dashboard problems.
47
48
49 -Q,--quiet
50 Make ctest quiet.
51
52 This option will suppress all the output. The output log file
53 will still be generated if the --output-log is specified.
54 Options such as --verbose, --extra-verbose, and --debug are
55 ignored if --quiet is specified.
56
57
58 -O <file>, --output-log <file>
59 Output to log file
60
61 This option tells ctest to write all its output to a log file.
62
63
64 -N,--show-only
65 Disable actual execution of tests.
66
67 This option tells ctest to list the tests that would be run but
68 not actually run them. Useful in conjunction with the -R and -E
69 options.
70
71
72 -R <regex>, --tests-regex <regex>
73 Run tests matching regular expression.
74
75 This option tells ctest to run only the tests whose names match
76 the given regular expression.
77
78
79 -E <regex>, --exclude-regex <regex>
80 Exclude tests matching regular expression.
81
82 This option tells ctest to NOT run the tests whose names match
83 the given regular expression.
84
85
86 -D <dashboard>, --dashboard <dashboard>
87 Execute dashboard test
88
89 This option tells ctest to perform act as a Dart client and per‐
90 form a dashboard test. All tests are <Mode><Test>, where Mode
91 can be Experimental, Nightly, and Continuous, and Test can be
92 Start, Update, Configure, Build, Test, Coverage, and Submit.
93
94
95 -M <model>, --test-model <model>
96 Sets the model for a dashboard
97
98 This option tells ctest to act as a Dart client where the Test‐
99 Model can be Experimental, Nightly, and Continuous. Combining -M
100 and -T is similar to -D
101
102
103 -T <action>, --test-action <action>
104 Sets the dashboard action to perform
105
106 This option tells ctest to act as a Dart client and perform some
107 action such as start, build, test etc. Combining -M and -T is
108 similar to -D
109
110
111 --track <track>
112 Specify the track to submit dashboard to
113
114 Submit dashboard to specified track instead of default one. By
115 default, the dashboard is submitted to Nightly, Experimental, or
116 Continuous track, but by specifying this option, the track can
117 be arbitrary.
118
119
120 -S <script>, --script <script>
121 Execute a dashboard for a configuration
122
123 This option tells ctest to load in a configuration script which
124 sets a number of parameters such as the binary and source direc‐
125 tories. Then ctest will do what is required to create and run a
126 dashboard. This option basically sets up a dashboard and then
127 runs ctest -D with the appropriate options.
128
129
130 -SP <script>, --script-new-process <script>
131 Execute a dashboard for a configuration
132
133 This option does the same operations as -S but it will do them
134 in a seperate process. This is primarily useful in cases where
135 the script may modify the environment and you do not want the
136 modified enviroment to impact other -S scripts.
137
138
139 -A <file>, --add-notes <file>
140 Add a notes file with submission
141
142 This option tells ctest to include a notes file when submitting
143 dashboard.
144
145
146 -I [Start,End,Stride,test#,test#|Test file], --tests-information
147 Run a specific number of tests by number.
148
149 This option causes ctest to run tests starting at number Start,
150 ending at number End, and incrementing by Stride. Any additional
151 numbers after Stride are considered individual test numbers.
152 Start, End,or stride can be empty. Optionally a file can be
153 given that contains the same syntax as the command line.
154
155
156 -U, --union
157 Take the Union of -I and -R
158
159 When both -R and -I are specified by default the intersection of
160 tests are run. By specifying -U the union of tests is run
161 instead.
162
163
164 --interactive-debug-mode [0|1]
165 Set the interactive mode to 0 or 1.
166
167 This option causes ctest to run tests in either an interactive
168 mode or a non-interactive mode. On Windows this means that in
169 non-interactive mode, all system debug pop up windows are
170 blocked. In dashboard mode (Experimental, Nightly, Continuous),
171 the default is non-interactive. When just running tests not for
172 a dashboard the default is to allow popups and interactive
173 debugging.
174
175
176 --build-and-test
177 Configure, build and run a test.
178
179 This option tells ctest to configure (i.e. run cmake on), build,
180 and or execute a test. The configure and test steps are
181 optional. The arguments to this command line are the source and
182 binary directories. By default this will run CMake on the
183 Source/Bin directories specified unless --build-nocmake is spec‐
184 ified. Both --build-makeprogram and --build-generator MUST be
185 provided to use --built-and-test. If --test-command is specified
186 then that will be run after the build is complete. Other options
187 that affect this mode are --build-target --build-nocmake,
188 --build-run-dir, --build-two-config, --build-exe-dir, --build-
189 project,--build-noclean, --build-options
190
191
192 --build-target
193 Specify a specific target to build.
194
195 This option goes with the --build-and-test option, if left out
196 the all target is built.
197
198
199 --build-nocmake
200 Run the build without running cmake first.
201
202 Skip the cmake step.
203
204
205 --build-run-dir
206 Specify directory to run programs from.
207
208 Directory where programs will be after it has been compiled.
209
210
211 --build-two-config
212 Run CMake twice
213
214
215 --build-exe-dir
216 Specify the directory for the executable.
217
218
219 --build-generator
220 Specify the generator to use.
221
222
223 --build-project
224 Specify the name of the project to build.
225
226
227 --build-makeprogram
228 Specify the make program to use.
229
230
231 --build-noclean
232 Skip the make clean step.
233
234
235 --build-options
236 Add extra options to the build step.
237
238 This option must be the last option with the exception of
239 --test-command
240
241
242 --test-command
243 The test to run with the --build-and-test option.
244
245
246 --tomorrow-tag
247 Nightly or experimental starts with next day tag.
248
249 This is useful if the build will not finish in one day.
250
251
252 --ctest-config
253 The configuration file used to initialize CTest state when sub‐
254 mitting dashboards.
255
256 This option tells CTest to use different initialization file
257 instead of DartConfiguration.tcl. This way multiple initializa‐
258 tion files can be used for example to submit to multiple dash‐
259 boards.
260
261
262 --overwrite
263 Overwrite CTest configuration option.
264
265 By default ctest uses configuration options from configuration
266 file. This option will overwrite the configuration option.
267
268
269 --extra-submit <file>[;<file>]
270 Submit extra files to the dashboard.
271
272 This option will submit extra files to the dashboard.
273
274
275 --force-new-ctest-process
276 Run child CTest instances as new processes
277
278 By default CTest will run child CTest instances within the same
279 process. If this behavior is not desired, this argument will
280 enforce new processes for child CTest processes.
281
282
283 --submit-index
284 Submit individual dashboard tests with specific index
285
286 This option allows performing the same CTest action (such as
287 test) multiple times and submit all stages to the same dashboard
288 (Dart2 required). Each execution requires different index.
289
290
291 --copyright [file]
292 Print the CMake copyright and exit.
293
294 If a file is specified, the copyright is written into it.
295
296
297 --help Print usage information and exit.
298
299 Usage describes the basic command line interface and its
300 options.
301
302
303 --help-full [file]
304 Print full help and exit.
305
306 Full help displays most of the documentation provided by the
307 UNIX man page. It is provided for use on non-UNIX platforms,
308 but is also convenient if the man page is not installed. If a
309 file is specified, the help is written into it.
310
311
312 --help-html [file]
313 Print full help in HTML format.
314
315 This option is used by CMake authors to help produce web pages.
316 If a file is specified, the help is written into it.
317
318
319 --help-man [file]
320 Print a UNIX man page and exit.
321
322 This option is used by the cmake build to generate the UNIX man
323 page. If a file is specified, the help is written into it.
324
325
326 --version [file]
327 Show program name/version banner and exit.
328
329 If a file is specified, the version is written into it.
330
331
333 The following modules are provided with CMake. They can be used with
334 INCLUDE(ModuleName).
335
336
338 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights
339 reserved.
340
341
342 Redistribution and use in source and binary forms, with or without mod‐
343 ification, are permitted provided that the following conditions are
344 met:
345
346
347 * Redistributions of source code must retain the above copyright
348 notice, this list of conditions and the following disclaimer.
349
350
351 * Redistributions in binary form must reproduce the above copy‐
352 right notice, this list of conditions and the following dis‐
353 claimer in the documentation and/or other materials provided
354 with the distribution.
355
356
357 * The names of Kitware, Inc., the Insight Consortium, or the names
358 of any consortium members, or of any contributors, may not be
359 used to endorse or promote products derived from this software
360 without specific prior written permission.
361
362
363 * Modified source versions must be plainly marked as such, and
364 must not be misrepresented as being the original software.
365
366
367 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS
368 IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
369 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTIC‐
370 ULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBU‐
371 TORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEM‐
372 PLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PRO‐
373 CUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROF‐
374 ITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIA‐
375 BILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEG‐
376 LIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFT‐
377 WARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
378
379
381 cmake(1), ccmake(1)
382
383
384 The following resources are available to get help using CMake:
385
386
387 Home Page
388 http://www.cmake.org
389
390 The primary starting point for learning about CMake.
391
392
393 Frequently Asked Questions
394 http://www.cmake.org/Wiki/CMake_FAQ
395
396 A Wiki is provided containing answers to frequently asked ques‐
397 tions.
398
399
400 Online Documentation
401 http://www.cmake.org/HTML/Documentation.html
402
403 Links to available documentation may be found on this web page.
404
405
406 Mailing List
407 http://www.cmake.org/HTML/MailingLists.html
408
409 For help and discussion about using cmake, a mailing list is
410 provided at cmake@cmake.org. The list is member-post-only but
411 one may sign up on the CMake web page. Please first read the
412 full documentation at http://www.cmake.org before posting ques‐
413 tions to the list.
414
415
416 Summary of helpful links:
417
418
419 Home: http://www.cmake.org
420 Docs: http://www.cmake.org/HTML/Documentation.html
421 Mail: http://www.cmake.org/HTML/MailingLists.html
422 FAQ: http://www.cmake.org/Wiki/CMake_FAQ
423
424
426 This manual page was generated by the "--help-man" option.
427
428
429
430
431ctest 2.4-patch 8 April 24, 2008 ctest(1)