ctest.1.rst 36 KB

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