ctest.1.rst 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003
  1. .. cmake-manual-description: CTest Command-Line Reference
  2. ctest(1)
  3. ********
  4. Synopsis
  5. ========
  6. .. parsed-literal::
  7. ctest [<options>]
  8. Description
  9. ===========
  10. The "ctest" executable is the CMake test driver program.
  11. CMake-generated build trees created for projects that use the
  12. ENABLE_TESTING and ADD_TEST commands have testing support. This
  13. program will run the tests and report results.
  14. Options
  15. =======
  16. ``-C <cfg>, --build-config <cfg>``
  17. Choose configuration to test.
  18. Some CMake-generated build trees can have multiple build
  19. configurations in the same tree. This option can be used to specify
  20. which one should be tested. Example configurations are "Debug" and
  21. "Release".
  22. ``-V,--verbose``
  23. Enable verbose output from tests.
  24. Test output is normally suppressed and only summary information is
  25. displayed. This option will show all test output.
  26. ``-VV,--extra-verbose``
  27. Enable more verbose output from tests.
  28. Test output is normally suppressed and only summary information is
  29. displayed. This option will show even more test output.
  30. ``--debug``
  31. Displaying more verbose internals of CTest.
  32. This feature will result in a large number of output that is mostly
  33. useful for debugging dashboard problems.
  34. ``--output-on-failure``
  35. Output anything outputted by the test program if the test should fail.
  36. This option can also be enabled by setting the environment variable
  37. ``CTEST_OUTPUT_ON_FAILURE``.
  38. ``-F``
  39. Enable failover.
  40. This option allows ctest to resume a test set execution that was
  41. previously interrupted. If no interruption occurred, the -F option
  42. will have no effect.
  43. ``-j <jobs>, --parallel <jobs>``
  44. Run the tests in parallel using the given number of jobs.
  45. This option tells ctest to run the tests in parallel using given
  46. number of jobs. This option can also be set by setting the
  47. environment variable ``CTEST_PARALLEL_LEVEL``.
  48. ``-Q,--quiet``
  49. Make ctest quiet.
  50. This option will suppress all the output. The output log file will
  51. still be generated if the --output-log is specified. Options such
  52. as --verbose, --extra-verbose, and --debug are ignored if --quiet is
  53. specified.
  54. ``-O <file>, --output-log <file>``
  55. Output to log file
  56. This option tells ctest to write all its output to a log file.
  57. ``-N,--show-only``
  58. Disable actual execution of tests.
  59. This option tells ctest to list the tests that would be run but not
  60. actually run them. Useful in conjunction with the -R and -E
  61. options.
  62. ``-L <regex>, --label-regex <regex>``
  63. Run tests with labels matching regular expression.
  64. This option tells ctest to run only the tests whose labels match the
  65. given regular expression.
  66. ``-R <regex>, --tests-regex <regex>``
  67. Run tests matching regular expression.
  68. This option tells ctest to run only the tests whose names match the
  69. given regular expression.
  70. ``-E <regex>, --exclude-regex <regex>``
  71. Exclude tests matching regular expression.
  72. This option tells ctest to NOT run the tests whose names match the
  73. given regular expression.
  74. ``-LE <regex>, --label-exclude <regex>``
  75. Exclude tests with labels matching regular expression.
  76. This option tells ctest to NOT run the tests whose labels match the
  77. given regular expression.
  78. ``-D <dashboard>, --dashboard <dashboard>``
  79. Execute dashboard test
  80. This option tells ctest to act as a CDash client and perform a
  81. dashboard test. All tests are <Mode><Test>, where Mode can be
  82. Experimental, Nightly, and Continuous, and Test can be Start,
  83. Update, Configure, Build, Test, Coverage, and Submit.
  84. ``-D <var>:<type>=<value>``
  85. Define a variable for script mode
  86. Pass in variable values on the command line. Use in conjunction
  87. with -S to pass variable values to a dashboard script. Parsing -D
  88. arguments as variable values is only attempted if the value
  89. following -D does not match any of the known dashboard types.
  90. ``-M <model>, --test-model <model>``
  91. Sets the model for a dashboard
  92. This option tells ctest to act as a CDash client where the TestModel
  93. can be Experimental, Nightly, and Continuous. Combining -M and -T
  94. is similar to -D
  95. ``-T <action>, --test-action <action>``
  96. Sets the dashboard action to perform
  97. This option tells ctest to act as a CDash client and perform some
  98. action such as start, build, test etc. Combining -M and -T is
  99. similar to -D
  100. ``--track <track>``
  101. Specify the track to submit dashboard to
  102. Submit dashboard to specified track instead of default one. By
  103. default, the dashboard is submitted to Nightly, Experimental, or
  104. Continuous track, but by specifying this option, the track can be
  105. arbitrary.
  106. ``-S <script>, --script <script>``
  107. Execute a dashboard for a configuration
  108. This option tells ctest to load in a configuration script which sets
  109. a number of parameters such as the binary and source directories.
  110. Then ctest will do what is required to create and run a dashboard.
  111. This option basically sets up a dashboard and then runs ctest -D
  112. with the appropriate options.
  113. ``-SP <script>, --script-new-process <script>``
  114. Execute a dashboard for a configuration
  115. This option does the same operations as -S but it will do them in a
  116. separate process. This is primarily useful in cases where the
  117. script may modify the environment and you do not want the modified
  118. environment to impact other -S scripts.
  119. ``-A <file>, --add-notes <file>``
  120. Add a notes file with submission
  121. This option tells ctest to include a notes file when submitting
  122. dashboard.
  123. ``-I [Start,End,Stride,test#,test#|Test file], --tests-information``
  124. Run a specific number of tests by number.
  125. This option causes ctest to run tests starting at number Start,
  126. ending at number End, and incrementing by Stride. Any additional
  127. numbers after Stride are considered individual test numbers. Start,
  128. End,or stride can be empty. Optionally a file can be given that
  129. contains the same syntax as the command line.
  130. ``-U, --union``
  131. Take the Union of -I and -R
  132. When both -R and -I are specified by default the intersection of
  133. tests are run. By specifying -U the union of tests is run instead.
  134. ``--rerun-failed``
  135. Run only the tests that failed previously
  136. This option tells ctest to perform only the tests that failed during
  137. its previous run. When this option is specified, ctest ignores all
  138. other options intended to modify the list of tests to run (-L, -R,
  139. -E, -LE, -I, etc). In the event that CTest runs and no tests fail,
  140. subsequent calls to ctest with the --rerun-failed option will run
  141. the set of tests that most recently failed (if any).
  142. ``--repeat-until-fail <n>``
  143. Require each test to run ``<n>`` times without failing in order to pass.
  144. This is useful in finding sporadic failures in test cases.
  145. ``--max-width <width>``
  146. Set the max width for a test name to output
  147. Set the maximum width for each test name to show in the output.
  148. This allows the user to widen the output to avoid clipping the test
  149. name which can be very annoying.
  150. ``--interactive-debug-mode [0|1]``
  151. Set the interactive mode to 0 or 1.
  152. This option causes ctest to run tests in either an interactive mode
  153. or a non-interactive mode. On Windows this means that in
  154. non-interactive mode, all system debug pop up windows are blocked.
  155. In dashboard mode (Experimental, Nightly, Continuous), the default
  156. is non-interactive. When just running tests not for a dashboard the
  157. default is to allow popups and interactive debugging.
  158. ``--no-label-summary``
  159. Disable timing summary information for labels.
  160. This option tells ctest not to print summary information for each
  161. label associated with the tests run. If there are no labels on the
  162. tests, nothing extra is printed.
  163. ``--build-and-test``
  164. Configure, build and run a test.
  165. This option tells ctest to configure (i.e. run cmake on), build,
  166. and or execute a test. The configure and test steps are optional.
  167. The arguments to this command line are the source and binary
  168. directories. By default this will run CMake on the Source/Bin
  169. directories specified unless --build-nocmake is specified.
  170. The --build-generator option *must* be provided to use
  171. --build-and-test. If --test-command is specified then that will be
  172. run after the build is complete. Other options that affect this
  173. mode are --build-target --build-nocmake, --build-run-dir,
  174. --build-two-config, --build-exe-dir,
  175. --build-project,--build-noclean, --build-options
  176. ``--build-target``
  177. Specify a specific target to build.
  178. This option goes with the --build-and-test option, if left out the
  179. all target is built.
  180. ``--build-nocmake``
  181. Run the build without running cmake first.
  182. Skip the cmake step.
  183. ``--build-run-dir``
  184. Specify directory to run programs from.
  185. Directory where programs will be after it has been compiled.
  186. ``--build-two-config``
  187. Run CMake twice
  188. ``--build-exe-dir``
  189. Specify the directory for the executable.
  190. ``--build-generator``
  191. Specify the generator to use.
  192. ``--build-generator-platform``
  193. Specify the generator-specific platform.
  194. ``--build-generator-toolset``
  195. Specify the generator-specific toolset.
  196. ``--build-project``
  197. Specify the name of the project to build.
  198. ``--build-makeprogram``
  199. Override the make program chosen by CTest with a given one.
  200. ``--build-noclean``
  201. Skip the make clean step.
  202. ``--build-config-sample``
  203. A sample executable to use to determine the configuration
  204. A sample executable to use to determine the configuration that
  205. should be used. e.g. Debug/Release/etc
  206. ``--build-options``
  207. Add extra options to the build step.
  208. This option must be the last option with the exception of
  209. --test-command
  210. ``--test-command``
  211. The test to run with the --build-and-test option.
  212. ``--test-timeout``
  213. The time limit in seconds, internal use only.
  214. ``--tomorrow-tag``
  215. Nightly or experimental starts with next day tag.
  216. This is useful if the build will not finish in one day.
  217. ``--ctest-config``
  218. The configuration file used to initialize CTest state when submitting dashboards.
  219. This option tells CTest to use different initialization file instead
  220. of CTestConfiguration.tcl. This way multiple initialization files
  221. can be used for example to submit to multiple dashboards.
  222. ``--overwrite``
  223. Overwrite CTest configuration option.
  224. By default ctest uses configuration options from configuration file.
  225. This option will overwrite the configuration option.
  226. ``--extra-submit <file>[;<file>]``
  227. Submit extra files to the dashboard.
  228. This option will submit extra files to the dashboard.
  229. ``--force-new-ctest-process``
  230. Run child CTest instances as new processes
  231. By default CTest will run child CTest instances within the same
  232. process. If this behavior is not desired, this argument will
  233. enforce new processes for child CTest processes.
  234. ``--schedule-random``
  235. Use a random order for scheduling tests
  236. This option will run the tests in a random order. It is commonly
  237. used to detect implicit dependencies in a test suite.
  238. ``--submit-index``
  239. Legacy option for old Dart2 dashboard server feature.
  240. Do not use.
  241. ``--timeout <seconds>``
  242. Set a global timeout on all tests.
  243. This option will set a global timeout on all tests that do not
  244. already have a timeout set on them.
  245. ``--stop-time <time>``
  246. Set a time at which all tests should stop running.
  247. Set a real time of day at which all tests should timeout. Example:
  248. 7:00:00 -0400. Any time format understood by the curl date parser
  249. is accepted. Local time is assumed if no timezone is specified.
  250. ``--http1.0``
  251. Submit using HTTP 1.0.
  252. This option will force CTest to use HTTP 1.0 to submit files to the
  253. dashboard, instead of HTTP 1.1.
  254. ``--no-compress-output``
  255. Do not compress test output when submitting.
  256. This flag will turn off automatic compression of test output. Use
  257. this to maintain compatibility with an older version of CDash which
  258. doesn't support compressed test output.
  259. ``--print-labels``
  260. Print all available test labels.
  261. This option will not run any tests, it will simply print the list of
  262. all labels associated with the test set.
  263. .. include:: OPTIONS_HELP.txt
  264. .. _`Dashboard Client`:
  265. Dashboard Client
  266. ================
  267. CTest can operate as a client for the `CDash`_ software quality dashboard
  268. application. As a dashboard client, CTest performs a sequence of steps
  269. to configure, build, and test software, and then submits the results to
  270. a `CDash`_ server.
  271. .. _`CDash`: http://cdash.org/
  272. Dashboard Client Steps
  273. ----------------------
  274. CTest defines an ordered list of testing steps of which some or all may
  275. be run as a dashboard client:
  276. ``Start``
  277. Start a new dashboard submission to be composed of results recorded
  278. by the following steps.
  279. See the `CTest Start Step`_ section below.
  280. ``Update``
  281. Update the source tree from its version control repository.
  282. Record the old and new versions and the list of updated source files.
  283. See the `CTest Update Step`_ section below.
  284. ``Configure``
  285. Configure the software by running a command in the build tree.
  286. Record the configuration output log.
  287. See the `CTest Configure Step`_ section below.
  288. ``Build``
  289. Build the software by running a command in the build tree.
  290. Record the build output log and detect warnings and errors.
  291. See the `CTest Build Step`_ section below.
  292. ``Test``
  293. Test the software by loading a ``CTestTestfile.cmake``
  294. from the build tree and executing the defined tests.
  295. Record the output and result of each test.
  296. See the `CTest Test Step`_ section below.
  297. ``Coverage``
  298. Compute coverage of the source code by running a coverage
  299. analysis tool and recording its output.
  300. See the `CTest Coverage Step`_ section below.
  301. ``MemCheck``
  302. Run the software test suite through a memory check tool.
  303. Record the test output, results, and issues reported by the tool.
  304. See the `CTest MemCheck Step`_ section below.
  305. ``Submit``
  306. Submit results recorded from other testing steps to the
  307. software quality dashboard server.
  308. See the `CTest Submit Step`_ section below.
  309. Dashboard Client Modes
  310. ----------------------
  311. CTest defines three modes of operation as a dashboard client:
  312. ``Nightly``
  313. This mode is intended to be invoked once per day, typically at night.
  314. It enables the ``Start``, ``Update``, ``Configure``, ``Build``, ``Test``,
  315. ``Coverage``, and ``Submit`` steps by default. Selected steps run even
  316. if the ``Update`` step reports no changes to the source tree.
  317. ``Continuous``
  318. This mode is intended to be invoked repeatedly throughout the day.
  319. It enables the ``Start``, ``Update``, ``Configure``, ``Build``, ``Test``,
  320. ``Coverage``, and ``Submit`` steps by default, but exits after the
  321. ``Update`` step if it reports no changes to the source tree.
  322. ``Experimental``
  323. This mode is intended to be invoked by a developer to test local changes.
  324. It enables the ``Start``, ``Configure``, ``Build``, ``Test``, ``Coverage``,
  325. and ``Submit`` steps by default.
  326. Dashboard Client via CTest Command-Line
  327. ---------------------------------------
  328. CTest can perform testing on an already-generated build tree.
  329. Run the ``ctest`` command with the current working directory set
  330. to the build tree and use one of these signatures::
  331. ctest -D <mode>[<step>]
  332. ctest -M <mode> [ -T <step> ]...
  333. The ``<mode>`` must be one of the above `Dashboard Client Modes`_,
  334. and each ``<step>`` must be one of the above `Dashboard Client Steps`_.
  335. CTest reads the `Dashboard Client Configuration`_ settings from
  336. a file in the build tree called either ``CTestConfiguration.ini``
  337. or ``DartConfiguration.tcl`` (the names are historical). The format
  338. of the file is::
  339. # Lines starting in '#' are comments.
  340. # Other non-blank lines are key-value pairs.
  341. <setting>: <value>
  342. where ``<setting>`` is the setting name and ``<value>`` is the
  343. setting value.
  344. In build trees generated by CMake, this configuration file is
  345. generated by the :module:`CTest` module if included by the project.
  346. The module uses variables to obtain a value for each setting
  347. as documented with the settings below.
  348. .. _`CTest Script`:
  349. Dashboard Client via CTest Script
  350. ---------------------------------
  351. CTest can perform testing driven by a :manual:`cmake-language(7)`
  352. script that creates and maintains the source and build tree as
  353. well as performing the testing steps. Run the ``ctest`` command
  354. with the current working directory set outside of any build tree
  355. and use one of these signatures::
  356. ctest -S <script>
  357. ctest -SP <script>
  358. The ``<script>`` file must call :ref:`CTest Commands` commands
  359. to run testing steps explicitly as documented below. The commands
  360. obtain `Dashboard Client Configuration`_ settings from their
  361. arguments or from variables set in the script.
  362. Dashboard Client Configuration
  363. ==============================
  364. The `Dashboard Client Steps`_ may be configured by named
  365. settings as documented in the following sections.
  366. .. _`CTest Start Step`:
  367. CTest Start Step
  368. ----------------
  369. Start a new dashboard submission to be composed of results recorded
  370. by the following steps.
  371. In a `CTest Script`_, the :command:`ctest_start` command runs this step.
  372. Arguments to the command may specify some of the step settings.
  373. The command first runs the command-line specified by the
  374. ``CTEST_CHECKOUT_COMMAND`` variable, if set, to initialize the source
  375. directory.
  376. Configuration settings include:
  377. ``BuildDirectory``
  378. The full path to the project build tree.
  379. * `CTest Script`_ variable: :variable:`CTEST_BINARY_DIRECTORY`
  380. * :module:`CTest` module variable: :variable:`PROJECT_BINARY_DIR`
  381. ``SourceDirectory``
  382. The full path to the project source tree.
  383. * `CTest Script`_ variable: :variable:`CTEST_SOURCE_DIRECTORY`
  384. * :module:`CTest` module variable: :variable:`PROJECT_SOURCE_DIR`
  385. .. _`CTest Update Step`:
  386. CTest Update Step
  387. -----------------
  388. In a `CTest Script`_, the :command:`ctest_update` command runs this step.
  389. Arguments to the command may specify some of the step settings.
  390. Configuration settings to specify the version control tool include:
  391. ``BZRCommand``
  392. ``bzr`` command-line tool to use if source tree is managed by Bazaar.
  393. * `CTest Script`_ variable: :variable:`CTEST_BZR_COMMAND`
  394. * :module:`CTest` module variable: none
  395. ``BZRUpdateOptions``
  396. Command-line options to the ``BZRCommand`` when updating the source.
  397. * `CTest Script`_ variable: :variable:`CTEST_BZR_UPDATE_OPTIONS`
  398. * :module:`CTest` module variable: none
  399. ``CVSCommand``
  400. ``cvs`` command-line tool to use if source tree is managed by CVS.
  401. * `CTest Script`_ variable: :variable:`CTEST_CVS_COMMAND`
  402. * :module:`CTest` module variable: ``CVSCOMMAND``
  403. ``CVSUpdateOptions``
  404. Command-line options to the ``CVSCommand`` when updating the source.
  405. * `CTest Script`_ variable: :variable:`CTEST_CVS_UPDATE_OPTIONS`
  406. * :module:`CTest` module variable: ``CVS_UPDATE_OPTIONS``
  407. ``GITCommand``
  408. ``git`` command-line tool to use if source tree is managed by Git.
  409. * `CTest Script`_ variable: :variable:`CTEST_GIT_COMMAND`
  410. * :module:`CTest` module variable: ``GITCOMMAND``
  411. ``GITUpdateCustom``
  412. Specify a custom command line (as a semicolon-separated list) to run
  413. in the source tree (Git work tree) to update it instead of running
  414. the ``GITCommand``.
  415. * `CTest Script`_ variable: :variable:`CTEST_GIT_UPDATE_CUSTOM`
  416. * :module:`CTest` module variable: ``CTEST_GIT_UPDATE_CUSTOM``
  417. ``GITUpdateOptions``
  418. Command-line options to the ``GITCommand`` when updating the source.
  419. * `CTest Script`_ variable: :variable:`CTEST_GIT_UPDATE_OPTIONS`
  420. * :module:`CTest` module variable: ``GIT_UPDATE_OPTIONS``
  421. ``HGCommand``
  422. ``hg`` command-line tool to use if source tree is managed by Mercurial.
  423. * `CTest Script`_ variable: :variable:`CTEST_HG_COMMAND`
  424. * :module:`CTest` module variable: none
  425. ``HGUpdateOptions``
  426. Command-line options to the ``HGCommand`` when updating the source.
  427. * `CTest Script`_ variable: :variable:`CTEST_HG_UPDATE_OPTIONS`
  428. * :module:`CTest` module variable: none
  429. ``P4Client``
  430. Value of the ``-c`` option to the ``P4Command``.
  431. * `CTest Script`_ variable: :variable:`CTEST_P4_CLIENT`
  432. * :module:`CTest` module variable: ``CTEST_P4_CLIENT``
  433. ``P4Command``
  434. ``p4`` command-line tool to use if source tree is managed by Perforce.
  435. * `CTest Script`_ variable: :variable:`CTEST_P4_COMMAND`
  436. * :module:`CTest` module variable: ``P4COMMAND``
  437. ``P4Options``
  438. Command-line options to the ``P4Command`` for all invocations.
  439. * `CTest Script`_ variable: :variable:`CTEST_P4_OPTIONS`
  440. * :module:`CTest` module variable: ``CTEST_P4_OPTIONS``
  441. ``P4UpdateCustom``
  442. Specify a custom command line (as a semicolon-separated list) to run
  443. in the source tree (Perforce tree) to update it instead of running
  444. the ``P4Command``.
  445. * `CTest Script`_ variable: none
  446. * :module:`CTest` module variable: ``CTEST_P4_UPDATE_CUSTOM``
  447. ``P4UpdateOptions``
  448. Command-line options to the ``P4Command`` when updating the source.
  449. * `CTest Script`_ variable: :variable:`CTEST_P4_UPDATE_OPTIONS`
  450. * :module:`CTest` module variable: ``CTEST_P4_UPDATE_OPTIONS``
  451. ``SVNCommand``
  452. ``svn`` command-line tool to use if source tree is managed by Subversion.
  453. * `CTest Script`_ variable: :variable:`CTEST_SVN_COMMAND`
  454. * :module:`CTest` module variable: ``SVNCOMMAND``
  455. ``SVNOptions``
  456. Command-line options to the ``SVNCommand`` for all invocations.
  457. * `CTest Script`_ variable: :variable:`CTEST_SVN_OPTIONS`
  458. * :module:`CTest` module variable: ``CTEST_SVN_OPTIONS``
  459. ``SVNUpdateOptions``
  460. Command-line options to the ``SVNCommand`` when updating the source.
  461. * `CTest Script`_ variable: :variable:`CTEST_SVN_UPDATE_OPTIONS`
  462. * :module:`CTest` module variable: ``SVN_UPDATE_OPTIONS``
  463. ``UpdateCommand``
  464. Specify the version-control command-line tool to use without
  465. detecting the VCS that manages the source tree.
  466. * `CTest Script`_ variable: :variable:`CTEST_UPDATE_COMMAND`
  467. * :module:`CTest` module variable: ``<VCS>COMMAND``
  468. when ``UPDATE_TYPE`` is ``<vcs>``, else ``UPDATE_COMMAND``
  469. ``UpdateOptions``
  470. Command-line options to the ``UpdateCommand``.
  471. * `CTest Script`_ variable: :variable:`CTEST_UPDATE_OPTIONS`
  472. * :module:`CTest` module variable: ``<VCS>_UPDATE_OPTIONS``
  473. when ``UPDATE_TYPE`` is ``<vcs>``, else ``UPDATE_OPTIONS``
  474. ``UpdateType``
  475. Specify the version-control system that manages the source
  476. tree if it cannot be detected automatically.
  477. The value may be ``bzr``, ``cvs``, ``git``, ``hg``,
  478. ``p4``, or ``svn``.
  479. * `CTest Script`_ variable: none, detected from source tree
  480. * :module:`CTest` module variable: ``UPDATE_TYPE`` if set,
  481. else ``CTEST_UPDATE_TYPE``
  482. ``UpdateVersionOnly``
  483. Specify that you want the version control update command to only
  484. discover the current version that is checked out, and not to update
  485. to a different version.
  486. * `CTest Script`_ variable: :variable:`CTEST_UPDATE_VERSION_ONLY`
  487. Additional configuration settings include:
  488. ``NightlyStartTime``
  489. In the ``Nightly`` dashboard mode, specify the "nightly start time".
  490. With centralized version control systems (``cvs`` and ``svn``),
  491. the ``Update`` step checks out the version of the software as of
  492. this time so that multiple clients choose a common version to test.
  493. This is not well-defined in distributed version-control systems so
  494. the setting is ignored.
  495. * `CTest Script`_ variable: :variable:`CTEST_NIGHTLY_START_TIME`
  496. * :module:`CTest` module variable: ``NIGHTLY_START_TIME`` if set,
  497. else ``CTEST_NIGHTLY_START_TIME``
  498. .. _`CTest Configure Step`:
  499. CTest Configure Step
  500. --------------------
  501. In a `CTest Script`_, the :command:`ctest_configure` command runs this step.
  502. Arguments to the command may specify some of the step settings.
  503. Configuration settings include:
  504. ``ConfigureCommand``
  505. Command-line to launch the software configuration process.
  506. It will be executed in the location specified by the
  507. ``BuildDirectory`` setting.
  508. * `CTest Script`_ variable: :variable:`CTEST_CONFIGURE_COMMAND`
  509. * :module:`CTest` module variable: :variable:`CMAKE_COMMAND`
  510. followed by :variable:`PROJECT_SOURCE_DIR`
  511. .. _`CTest Build Step`:
  512. CTest Build Step
  513. ----------------
  514. In a `CTest Script`_, the :command:`ctest_build` command runs this step.
  515. Arguments to the command may specify some of the step settings.
  516. Configuration settings include:
  517. ``DefaultCTestConfigurationType``
  518. When the build system to be launched allows build-time selection
  519. of the configuration (e.g. ``Debug``, ``Release``), this specifies
  520. the default configuration to be built when no ``-C`` option is
  521. given to the ``ctest`` command. The value will be substituted into
  522. the value of ``MakeCommand`` to replace the literal string
  523. ``${CTEST_CONFIGURATION_TYPE}`` if it appears.
  524. * `CTest Script`_ variable: :variable:`CTEST_CONFIGURATION_TYPE`
  525. * :module:`CTest` module variable: ``DEFAULT_CTEST_CONFIGURATION_TYPE``,
  526. initialized by the ``CMAKE_CONFIG_TYPE`` environment variable
  527. ``MakeCommand``
  528. Command-line to launch the software build process.
  529. It will be executed in the location specified by the
  530. ``BuildDirectory`` setting.
  531. * `CTest Script`_ variable: :variable:`CTEST_BUILD_COMMAND`
  532. * :module:`CTest` module variable: ``MAKECOMMAND``,
  533. initialized by the :command:`build_command` command
  534. ``UseLaunchers``
  535. For build trees generated by CMake using one of the
  536. :ref:`Makefile Generators` or the :generator:`Ninja`
  537. generator, specify whether the
  538. ``CTEST_USE_LAUNCHERS`` feature is enabled by the
  539. :module:`CTestUseLaunchers` module (also included by the
  540. :module:`CTest` module). When enabled, the generated build
  541. system wraps each invocation of the compiler, linker, or
  542. custom command line with a "launcher" that communicates
  543. with CTest via environment variables and files to report
  544. granular build warning and error information. Otherwise,
  545. CTest must "scrape" the build output log for diagnostics.
  546. * `CTest Script`_ variable: :variable:`CTEST_USE_LAUNCHERS`
  547. * :module:`CTest` module variable: ``CTEST_USE_LAUNCHERS``
  548. .. _`CTest Test Step`:
  549. CTest Test Step
  550. ---------------
  551. In a `CTest Script`_, the :command:`ctest_test` command runs this step.
  552. Arguments to the command may specify some of the step settings.
  553. Configuration settings include:
  554. ``TimeOut``
  555. The default timeout for each test if not specified by the
  556. :prop_test:`TIMEOUT` test property.
  557. * `CTest Script`_ variable: :variable:`CTEST_TEST_TIMEOUT`
  558. * :module:`CTest` module variable: ``DART_TESTING_TIMEOUT``
  559. .. _`CTest Coverage Step`:
  560. CTest Coverage Step
  561. -------------------
  562. In a `CTest Script`_, the :command:`ctest_coverage` command runs this step.
  563. Arguments to the command may specify some of the step settings.
  564. Configuration settings include:
  565. ``CoverageCommand``
  566. Command-line tool to perform software coverage analysis.
  567. It will be executed in the location specified by the
  568. ``BuildDirectory`` setting.
  569. * `CTest Script`_ variable: :variable:`CTEST_COVERAGE_COMMAND`
  570. * :module:`CTest` module variable: ``COVERAGE_COMMAND``
  571. ``CoverageExtraFlags``
  572. Specify command-line options to the ``CoverageCommand`` tool.
  573. * `CTest Script`_ variable: :variable:`CTEST_COVERAGE_EXTRA_FLAGS`
  574. * :module:`CTest` module variable: ``COVERAGE_EXTRA_FLAGS``
  575. .. _`CTest MemCheck Step`:
  576. CTest MemCheck Step
  577. -------------------
  578. In a `CTest Script`_, the :command:`ctest_memcheck` command runs this step.
  579. Arguments to the command may specify some of the step settings.
  580. Configuration settings include:
  581. ``MemoryCheckCommand``
  582. Command-line tool to perform dynamic analysis. Test command lines
  583. will be launched through this tool.
  584. * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_COMMAND`
  585. * :module:`CTest` module variable: ``MEMORYCHECK_COMMAND``
  586. ``MemoryCheckCommandOptions``
  587. Specify command-line options to the ``MemoryCheckCommand`` tool.
  588. They will be placed prior to the test command line.
  589. * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_COMMAND_OPTIONS`
  590. * :module:`CTest` module variable: ``MEMORYCHECK_COMMAND_OPTIONS``
  591. ``MemoryCheckType``
  592. Specify the type of memory checking to perform.
  593. * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_TYPE`
  594. * :module:`CTest` module variable: ``MEMORYCHECK_TYPE``
  595. ``MemoryCheckSanitizerOptions``
  596. Specify options to sanitizers when running with a sanitize-enabled build.
  597. * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_SANITIZER_OPTIONS`
  598. * :module:`CTest` module variable: ``MEMORYCHECK_SANITIZER_OPTIONS``
  599. ``MemoryCheckSuppressionFile``
  600. Specify a file containing suppression rules for the
  601. ``MemoryCheckCommand`` tool. It will be passed with options
  602. appropriate to the tool.
  603. * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_SUPPRESSIONS_FILE`
  604. * :module:`CTest` module variable: ``MEMORYCHECK_SUPPRESSIONS_FILE``
  605. Additional configuration settings include:
  606. ``BoundsCheckerCommand``
  607. Specify a ``MemoryCheckCommand`` that is known to be command-line
  608. compatible with Bounds Checker.
  609. * `CTest Script`_ variable: none
  610. * :module:`CTest` module variable: none
  611. ``PurifyCommand``
  612. Specify a ``MemoryCheckCommand`` that is known to be command-line
  613. compatible with Purify.
  614. * `CTest Script`_ variable: none
  615. * :module:`CTest` module variable: ``PURIFYCOMMAND``
  616. ``ValgrindCommand``
  617. Specify a ``MemoryCheckCommand`` that is known to be command-line
  618. compatible with Valgrind.
  619. * `CTest Script`_ variable: none
  620. * :module:`CTest` module variable: ``VALGRIND_COMMAND``
  621. ``ValgrindCommandOptions``
  622. Specify command-line options to the ``ValgrindCommand`` tool.
  623. They will be placed prior to the test command line.
  624. * `CTest Script`_ variable: none
  625. * :module:`CTest` module variable: ``VALGRIND_COMMAND_OPTIONS``
  626. .. _`CTest Submit Step`:
  627. CTest Submit Step
  628. -----------------
  629. In a `CTest Script`_, the :command:`ctest_submit` command runs this step.
  630. Arguments to the command may specify some of the step settings.
  631. Configuration settings include:
  632. ``BuildName``
  633. Describe the dashboard client platform with a short string.
  634. (Operating system, compiler, etc.)
  635. * `CTest Script`_ variable: :variable:`CTEST_BUILD_NAME`
  636. * :module:`CTest` module variable: ``BUILDNAME``
  637. ``CDashVersion``
  638. Specify the version of `CDash`_ on the server.
  639. * `CTest Script`_ variable: none, detected from server
  640. * :module:`CTest` module variable: ``CTEST_CDASH_VERSION``
  641. ``CTestSubmitRetryCount``
  642. Specify a number of attempts to retry submission on network failure.
  643. * `CTest Script`_ variable: none,
  644. use the :command:`ctest_submit` ``RETRY_COUNT`` option.
  645. * :module:`CTest` module variable: ``CTEST_SUBMIT_RETRY_COUNT``
  646. ``CTestSubmitRetryDelay``
  647. Specify a delay before retrying submission on network failure.
  648. * `CTest Script`_ variable: none,
  649. use the :command:`ctest_submit` ``RETRY_DELAY`` option.
  650. * :module:`CTest` module variable: ``CTEST_SUBMIT_RETRY_DELAY``
  651. ``CurlOptions``
  652. Specify a semicolon-separated list of options to control the
  653. Curl library that CTest uses internally to connect to the
  654. server. Possible options are ``CURLOPT_SSL_VERIFYPEER_OFF``
  655. and ``CURLOPT_SSL_VERIFYHOST_OFF``.
  656. * `CTest Script`_ variable: :variable:`CTEST_CURL_OPTIONS`
  657. * :module:`CTest` module variable: ``CTEST_CURL_OPTIONS``
  658. ``DropLocation``
  659. The path on the dashboard server to send the submission.
  660. * `CTest Script`_ variable: :variable:`CTEST_DROP_LOCATION`
  661. * :module:`CTest` module variable: ``DROP_LOCATION`` if set,
  662. else ``CTEST_DROP_LOCATION``
  663. ``DropMethod``
  664. Specify the method by which results should be submitted to the
  665. dashboard server. The value may be ``cp``, ``ftp``, ``http``,
  666. ``https``, ``scp``, or ``xmlrpc`` (if CMake was built with
  667. support for it).
  668. * `CTest Script`_ variable: :variable:`CTEST_DROP_METHOD`
  669. * :module:`CTest` module variable: ``DROP_METHOD`` if set,
  670. else ``CTEST_DROP_METHOD``
  671. ``DropSite``
  672. The dashboard server name
  673. (for ``ftp``, ``http``, and ``https``, ``scp``, and ``xmlrpc``).
  674. * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE`
  675. * :module:`CTest` module variable: ``DROP_SITE`` if set,
  676. else ``CTEST_DROP_SITE``
  677. ``DropSitePassword``
  678. The dashboard server login password, if any
  679. (for ``ftp``, ``http``, and ``https``).
  680. * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE_PASSWORD`
  681. * :module:`CTest` module variable: ``DROP_SITE_PASSWORD`` if set,
  682. else ``CTEST_DROP_SITE_PASWORD``
  683. ``DropSiteUser``
  684. The dashboard server login user name, if any
  685. (for ``ftp``, ``http``, and ``https``).
  686. * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE_USER`
  687. * :module:`CTest` module variable: ``DROP_SITE_USER`` if set,
  688. else ``CTEST_DROP_SITE_USER``
  689. ``IsCDash``
  690. Specify whether the dashboard server is `CDash`_ or an older
  691. dashboard server implementation requiring ``TriggerSite``.
  692. * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE_CDASH`
  693. * :module:`CTest` module variable: ``CTEST_DROP_SITE_CDASH``
  694. ``ScpCommand``
  695. ``scp`` command-line tool to use when ``DropMethod`` is ``scp``.
  696. * `CTest Script`_ variable: :variable:`CTEST_SCP_COMMAND`
  697. * :module:`CTest` module variable: ``SCPCOMMAND``
  698. ``Site``
  699. Describe the dashboard client host site with a short string.
  700. (Hostname, domain, etc.)
  701. * `CTest Script`_ variable: :variable:`CTEST_SITE`
  702. * :module:`CTest` module variable: ``SITE``,
  703. initialized by the :command:`site_name` command
  704. ``TriggerSite``
  705. Legacy option to support older dashboard server implementations.
  706. Not used when ``IsCDash`` is true.
  707. * `CTest Script`_ variable: :variable:`CTEST_TRIGGER_SITE`
  708. * :module:`CTest` module variable: ``TRIGGER_SITE`` if set,
  709. else ``CTEST_TRIGGER_SITE``
  710. See Also
  711. ========
  712. .. include:: LINKS.txt