ctest.1.rst 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000
  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. ================
  266. CTest can operate as a client for the `CDash`_ software quality dashboard
  267. application. As a dashboard client, CTest performs a sequence of steps
  268. to configure, build, and test software, and then submits the results to
  269. a `CDash`_ server.
  270. .. _`CDash`: http://cdash.org/
  271. Dashboard Client Steps
  272. ----------------------
  273. CTest defines an ordered list of testing steps of which some or all may
  274. be run as a dashboard client:
  275. ``Start``
  276. Start a new dashboard submission to be composed of results recorded
  277. by the following steps.
  278. See the `CTest Start Step`_ section below.
  279. ``Update``
  280. Update the source tree from its version control repository.
  281. Record the old and new versions and the list of updated source files.
  282. See the `CTest Update Step`_ section below.
  283. ``Configure``
  284. Configure the software by running a command in the build tree.
  285. Record the configuration output log.
  286. See the `CTest Configure Step`_ section below.
  287. ``Build``
  288. Build the software by running a command in the build tree.
  289. Record the build output log and detect warnings and errors.
  290. See the `CTest Build Step`_ section below.
  291. ``Test``
  292. Test the software by loading a ``CTestTestfile.cmake``
  293. from the build tree and executing the defined tests.
  294. Record the output and result of each test.
  295. See the `CTest Test Step`_ section below.
  296. ``Coverage``
  297. Compute coverage of the source code by running a coverage
  298. analysis tool and recording its output.
  299. See the `CTest Coverage Step`_ section below.
  300. ``MemCheck``
  301. Run the software test suite through a memory check tool.
  302. Record the test output, results, and issues reported by the tool.
  303. See the `CTest MemCheck Step`_ section below.
  304. ``Submit``
  305. Submit results recorded from other testing steps to the
  306. software quality dashboard server.
  307. See the `CTest Submit Step`_ section below.
  308. Dashboard Client Modes
  309. ----------------------
  310. CTest defines three modes of operation as a dashboard client:
  311. ``Nightly``
  312. This mode is intended to be invoked once per day, typically at night.
  313. It enables the ``Start``, ``Update``, ``Configure``, ``Build``, ``Test``,
  314. ``Coverage``, and ``Submit`` steps by default. Selected steps run even
  315. if the ``Update`` step reports no changes to the source tree.
  316. ``Continuous``
  317. This mode is intended to be invoked repeatedly throughout the day.
  318. It enables the ``Start``, ``Update``, ``Configure``, ``Build``, ``Test``,
  319. ``Coverage``, and ``Submit`` steps by default, but exits after the
  320. ``Update`` step if it reports no changes to the source tree.
  321. ``Experimental``
  322. This mode is intended to be invoked by a developer to test local changes.
  323. It enables the ``Start``, ``Configure``, ``Build``, ``Test``, ``Coverage``,
  324. and ``Submit`` steps by default.
  325. Dashboard Client via CTest Command-Line
  326. ---------------------------------------
  327. CTest can perform testing on an already-generated build tree.
  328. Run the ``ctest`` command with the current working directory set
  329. to the build tree and use one of these signatures::
  330. ctest -D <mode>[<step>]
  331. ctest -M <mode> [ -T <step> ]...
  332. The ``<mode>`` must be one of the above `Dashboard Client Modes`_,
  333. and each ``<step>`` must be one of the above `Dashboard Client Steps`_.
  334. CTest reads the `Dashboard Client Configuration`_ settings from
  335. a file in the build tree called either ``CTestConfiguration.ini``
  336. or ``DartConfiguration.tcl`` (the names are historical). The format
  337. of the file is::
  338. # Lines starting in '#' are comments.
  339. # Other non-blank lines are key-value pairs.
  340. <setting>: <value>
  341. where ``<setting>`` is the setting name and ``<value>`` is the
  342. setting value.
  343. In build trees generated by CMake, this configuration file is
  344. generated by the :module:`CTest` module if included by the project.
  345. The module uses variables to obtain a value for each setting
  346. as documented with the settings below.
  347. .. _`CTest Script`:
  348. Dashboard Client via CTest Script
  349. ---------------------------------
  350. CTest can perform testing driven by a :manual:`cmake-language(7)`
  351. script that creates and maintains the source and build tree as
  352. well as performing the testing steps. Run the ``ctest`` command
  353. with the current working directory set outside of any build tree
  354. and use one of these signatures::
  355. ctest -S <script>
  356. ctest -SP <script>
  357. The ``<script>`` file must call :ref:`CTest Commands` commands
  358. to run testing steps explicitly as documented below. The commands
  359. obtain `Dashboard Client Configuration`_ settings from their
  360. arguments or from variables set in the script.
  361. Dashboard Client Configuration
  362. ==============================
  363. The `Dashboard Client Steps`_ may be configured by named
  364. settings as documented in the following sections.
  365. .. _`CTest Start Step`:
  366. CTest Start Step
  367. ----------------
  368. Start a new dashboard submission to be composed of results recorded
  369. by the following steps.
  370. In a `CTest Script`_, the :command:`ctest_start` command runs this step.
  371. Arguments to the command may specify some of the step settings.
  372. The command first runs the command-line specified by the
  373. ``CTEST_CHECKOUT_COMMAND`` variable, if set, to initialize the source
  374. directory.
  375. Configuration settings include:
  376. ``BuildDirectory``
  377. The full path to the project build tree.
  378. * `CTest Script`_ variable: :variable:`CTEST_BINARY_DIRECTORY`
  379. * :module:`CTest` module variable: :variable:`PROJECT_BINARY_DIR`
  380. ``SourceDirectory``
  381. The full path to the project source tree.
  382. * `CTest Script`_ variable: :variable:`CTEST_SOURCE_DIRECTORY`
  383. * :module:`CTest` module variable: :variable:`PROJECT_SOURCE_DIR`
  384. .. _`CTest Update Step`:
  385. CTest Update Step
  386. -----------------
  387. In a `CTest Script`_, the :command:`ctest_update` command runs this step.
  388. Arguments to the command may specify some of the step settings.
  389. Configuration settings to specify the version control tool include:
  390. ``BZRCommand``
  391. ``bzr`` command-line tool to use if source tree is managed by Bazaar.
  392. * `CTest Script`_ variable: :variable:`CTEST_BZR_COMMAND`
  393. * :module:`CTest` module variable: none
  394. ``BZRUpdateOptions``
  395. Command-line options to the ``BZRCommand`` when updating the source.
  396. * `CTest Script`_ variable: :variable:`CTEST_BZR_UPDATE_OPTIONS`
  397. * :module:`CTest` module variable: none
  398. ``CVSCommand``
  399. ``cvs`` command-line tool to use if source tree is managed by CVS.
  400. * `CTest Script`_ variable: :variable:`CTEST_CVS_COMMAND`
  401. * :module:`CTest` module variable: ``CVSCOMMAND``
  402. ``CVSUpdateOptions``
  403. Command-line options to the ``CVSCommand`` when updating the source.
  404. * `CTest Script`_ variable: :variable:`CTEST_CVS_UPDATE_OPTIONS`
  405. * :module:`CTest` module variable: ``CVS_UPDATE_OPTIONS``
  406. ``GITCommand``
  407. ``git`` command-line tool to use if source tree is managed by Git.
  408. * `CTest Script`_ variable: :variable:`CTEST_GIT_COMMAND`
  409. * :module:`CTest` module variable: ``GITCOMMAND``
  410. ``GITUpdateCustom``
  411. Specify a custom command line (as a semicolon-separated list) to run
  412. in the source tree (Git work tree) to update it instead of running
  413. the ``GITCommand``.
  414. * `CTest Script`_ variable: :variable:`CTEST_GIT_UPDATE_CUSTOM`
  415. * :module:`CTest` module variable: ``CTEST_GIT_UPDATE_CUSTOM``
  416. ``GITUpdateOptions``
  417. Command-line options to the ``GITCommand`` when updating the source.
  418. * `CTest Script`_ variable: :variable:`CTEST_GIT_UPDATE_OPTIONS`
  419. * :module:`CTest` module variable: ``GIT_UPDATE_OPTIONS``
  420. ``HGCommand``
  421. ``hg`` command-line tool to use if source tree is managed by Mercurial.
  422. * `CTest Script`_ variable: :variable:`CTEST_HG_COMMAND`
  423. * :module:`CTest` module variable: none
  424. ``HGUpdateOptions``
  425. Command-line options to the ``HGCommand`` when updating the source.
  426. * `CTest Script`_ variable: :variable:`CTEST_HG_UPDATE_OPTIONS`
  427. * :module:`CTest` module variable: none
  428. ``P4Client``
  429. Value of the ``-c`` option to the ``P4Command``.
  430. * `CTest Script`_ variable: :variable:`CTEST_P4_CLIENT`
  431. * :module:`CTest` module variable: ``CTEST_P4_CLIENT``
  432. ``P4Command``
  433. ``p4`` command-line tool to use if source tree is managed by Perforce.
  434. * `CTest Script`_ variable: :variable:`CTEST_P4_COMMAND`
  435. * :module:`CTest` module variable: ``P4COMMAND``
  436. ``P4Options``
  437. Command-line options to the ``P4Command`` for all invocations.
  438. * `CTest Script`_ variable: :variable:`CTEST_P4_OPTIONS`
  439. * :module:`CTest` module variable: ``CTEST_P4_OPTIONS``
  440. ``P4UpdateCustom``
  441. Specify a custom command line (as a semicolon-separated list) to run
  442. in the source tree (Perforce tree) to update it instead of running
  443. the ``P4Command``.
  444. * `CTest Script`_ variable: none
  445. * :module:`CTest` module variable: ``CTEST_P4_UPDATE_CUSTOM``
  446. ``P4UpdateOptions``
  447. Command-line options to the ``P4Command`` when updating the source.
  448. * `CTest Script`_ variable: :variable:`CTEST_P4_UPDATE_OPTIONS`
  449. * :module:`CTest` module variable: ``CTEST_P4_UPDATE_OPTIONS``
  450. ``SVNCommand``
  451. ``svn`` command-line tool to use if source tree is managed by Subversion.
  452. * `CTest Script`_ variable: :variable:`CTEST_SVN_COMMAND`
  453. * :module:`CTest` module variable: ``SVNCOMMAND``
  454. ``SVNOptions``
  455. Command-line options to the ``SVNCommand`` for all invocations.
  456. * `CTest Script`_ variable: :variable:`CTEST_SVN_OPTIONS`
  457. * :module:`CTest` module variable: ``CTEST_SVN_OPTIONS``
  458. ``SVNUpdateOptions``
  459. Command-line options to the ``SVNCommand`` when updating the source.
  460. * `CTest Script`_ variable: :variable:`CTEST_SVN_UPDATE_OPTIONS`
  461. * :module:`CTest` module variable: ``SVN_UPDATE_OPTIONS``
  462. ``UpdateCommand``
  463. Specify the version-control command-line tool to use without
  464. detecting the VCS that manages the source tree.
  465. * `CTest Script`_ variable: :variable:`CTEST_UPDATE_COMMAND`
  466. * :module:`CTest` module variable: ``<VCS>COMMAND``
  467. when ``UPDATE_TYPE`` is ``<vcs>``, else ``UPDATE_COMMAND``
  468. ``UpdateOptions``
  469. Command-line options to the ``UpdateCommand``.
  470. * `CTest Script`_ variable: :variable:`CTEST_UPDATE_OPTIONS`
  471. * :module:`CTest` module variable: ``<VCS>_UPDATE_OPTIONS``
  472. when ``UPDATE_TYPE`` is ``<vcs>``, else ``UPDATE_OPTIONS``
  473. ``UpdateType``
  474. Specify the version-control system that manages the source
  475. tree if it cannot be detected automatically.
  476. The value may be ``bzr``, ``cvs``, ``git``, ``hg``,
  477. ``p4``, or ``svn``.
  478. * `CTest Script`_ variable: none, detected from source tree
  479. * :module:`CTest` module variable: ``UPDATE_TYPE`` if set,
  480. else ``CTEST_UPDATE_TYPE``
  481. ``UpdateVersionOnly``
  482. Specify that you want the version control update command to only
  483. discover the current version that is checked out, and not to update
  484. to a different version.
  485. * `CTest Script`_ variable: :variable:`CTEST_UPDATE_VERSION_ONLY`
  486. Additional configuration settings include:
  487. ``NightlyStartTime``
  488. In the ``Nightly`` dashboard mode, specify the "nightly start time".
  489. With centralized version control systems (``cvs`` and ``svn``),
  490. the ``Update`` step checks out the version of the software as of
  491. this time so that multiple clients choose a common version to test.
  492. This is not well-defined in distributed version-control systems so
  493. the setting is ignored.
  494. * `CTest Script`_ variable: :variable:`CTEST_NIGHTLY_START_TIME`
  495. * :module:`CTest` module variable: ``NIGHTLY_START_TIME`` if set,
  496. else ``CTEST_NIGHTLY_START_TIME``
  497. .. _`CTest Configure Step`:
  498. CTest Configure Step
  499. --------------------
  500. In a `CTest Script`_, the :command:`ctest_configure` command runs this step.
  501. Arguments to the command may specify some of the step settings.
  502. Configuration settings include:
  503. ``ConfigureCommand``
  504. Command-line to launch the software configuration process.
  505. It will be executed in the location specified by the
  506. ``BuildDirectory`` setting.
  507. * `CTest Script`_ variable: :variable:`CTEST_CONFIGURE_COMMAND`
  508. * :module:`CTest` module variable: :variable:`CMAKE_COMMAND`
  509. followed by :variable:`PROJECT_SOURCE_DIR`
  510. .. _`CTest Build Step`:
  511. CTest Build Step
  512. ----------------
  513. In a `CTest Script`_, the :command:`ctest_build` command runs this step.
  514. Arguments to the command may specify some of the step settings.
  515. Configuration settings include:
  516. ``DefaultCTestConfigurationType``
  517. When the build system to be launched allows build-time selection
  518. of the configuration (e.g. ``Debug``, ``Release``), this specifies
  519. the default configuration to be built when no ``-C`` option is
  520. given to the ``ctest`` command. The value will be substituted into
  521. the value of ``MakeCommand`` to replace the literal string
  522. ``${CTEST_CONFIGURATION_TYPE}`` if it appears.
  523. * `CTest Script`_ variable: :variable:`CTEST_CONFIGURATION_TYPE`
  524. * :module:`CTest` module variable: ``DEFAULT_CTEST_CONFIGURATION_TYPE``,
  525. initialized by the ``CMAKE_CONFIG_TYPE`` environment variable
  526. ``MakeCommand``
  527. Command-line to launch the software build process.
  528. It will be executed in the location specified by the
  529. ``BuildDirectory`` setting.
  530. * `CTest Script`_ variable: :variable:`CTEST_BUILD_COMMAND`
  531. * :module:`CTest` module variable: ``MAKECOMMAND``,
  532. initialized by the :command:`build_command` command
  533. ``UseLaunchers``
  534. For build trees generated by CMake using a Makefile generator
  535. or the :generator:`Ninja` generator, specify whether the
  536. ``CTEST_USE_LAUNCHERS`` feature is enabled by the
  537. :module:`CTestUseLaunchers` module (also included by the
  538. :module:`CTest` module). When enabled, the generated build
  539. system wraps each invocation of the compiler, linker, or
  540. custom command line with a "launcher" that communicates
  541. with CTest via environment variables and files to report
  542. granular build warning and error information. Otherwise,
  543. CTest must "scrape" the build output log for diagnostics.
  544. * `CTest Script`_ variable: :variable:`CTEST_USE_LAUNCHERS`
  545. * :module:`CTest` module variable: ``CTEST_USE_LAUNCHERS``
  546. .. _`CTest Test Step`:
  547. CTest Test Step
  548. ---------------
  549. In a `CTest Script`_, the :command:`ctest_test` command runs this step.
  550. Arguments to the command may specify some of the step settings.
  551. Configuration settings include:
  552. ``TimeOut``
  553. The default timeout for each test if not specified by the
  554. :prop_test:`TIMEOUT` test property.
  555. * `CTest Script`_ variable: :variable:`CTEST_TEST_TIMEOUT`
  556. * :module:`CTest` module variable: ``DART_TESTING_TIMEOUT``
  557. .. _`CTest Coverage Step`:
  558. CTest Coverage Step
  559. -------------------
  560. In a `CTest Script`_, the :command:`ctest_coverage` command runs this step.
  561. Arguments to the command may specify some of the step settings.
  562. Configuration settings include:
  563. ``CoverageCommand``
  564. Command-line tool to perform software coverage analysis.
  565. It will be executed in the location specified by the
  566. ``BuildDirectory`` setting.
  567. * `CTest Script`_ variable: :variable:`CTEST_COVERAGE_COMMAND`
  568. * :module:`CTest` module variable: ``COVERAGE_COMMAND``
  569. ``CoverageExtraFlags``
  570. Specify command-line options to the ``CoverageCommand`` tool.
  571. * `CTest Script`_ variable: :variable:`CTEST_COVERAGE_EXTRA_FLAGS`
  572. * :module:`CTest` module variable: ``COVERAGE_EXTRA_FLAGS``
  573. .. _`CTest MemCheck Step`:
  574. CTest MemCheck Step
  575. -------------------
  576. In a `CTest Script`_, the :command:`ctest_memcheck` command runs this step.
  577. Arguments to the command may specify some of the step settings.
  578. Configuration settings include:
  579. ``MemoryCheckCommand``
  580. Command-line tool to perform dynamic analysis. Test command lines
  581. will be launched through this tool.
  582. * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_COMMAND`
  583. * :module:`CTest` module variable: ``MEMORYCHECK_COMMAND``
  584. ``MemoryCheckCommandOptions``
  585. Specify command-line options to the ``MemoryCheckCommand`` tool.
  586. They will be placed prior to the test command line.
  587. * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_COMMAND_OPTIONS`
  588. * :module:`CTest` module variable: ``MEMORYCHECK_COMMAND_OPTIONS``
  589. ``MemoryCheckType``
  590. Specify the type of memory checking to perform.
  591. * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_TYPE`
  592. * :module:`CTest` module variable: ``MEMORYCHECK_TYPE``
  593. ``MemoryCheckSanitizerOptions``
  594. Specify options to sanitizers when running with a sanitize-enabled build.
  595. * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_SANITIZER_OPTIONS`
  596. * :module:`CTest` module variable: ``MEMORYCHECK_SANITIZER_OPTIONS``
  597. ``MemoryCheckSuppressionFile``
  598. Specify a file containing suppression rules for the
  599. ``MemoryCheckCommand`` tool. It will be passed with options
  600. appropriate to the tool.
  601. * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_SUPPRESSIONS_FILE`
  602. * :module:`CTest` module variable: ``MEMORYCHECK_SUPPRESSIONS_FILE``
  603. Additional configuration settings include:
  604. ``BoundsCheckerCommand``
  605. Specify a ``MemoryCheckCommand`` that is known to be command-line
  606. compatible with Bounds Checker.
  607. * `CTest Script`_ variable: none
  608. * :module:`CTest` module variable: none
  609. ``PurifyCommand``
  610. Specify a ``MemoryCheckCommand`` that is known to be command-line
  611. compatible with Purify.
  612. * `CTest Script`_ variable: none
  613. * :module:`CTest` module variable: ``PURIFYCOMMAND``
  614. ``ValgrindCommand``
  615. Specify a ``MemoryCheckCommand`` that is known to be command-line
  616. compatible with Valgrind.
  617. * `CTest Script`_ variable: none
  618. * :module:`CTest` module variable: ``VALGRIND_COMMAND``
  619. ``ValgrindCommandOptions``
  620. Specify command-line options to the ``ValgrindCommand`` tool.
  621. They will be placed prior to the test command line.
  622. * `CTest Script`_ variable: none
  623. * :module:`CTest` module variable: ``VALGRIND_COMMAND_OPTIONS``
  624. .. _`CTest Submit Step`:
  625. CTest Submit Step
  626. -----------------
  627. In a `CTest Script`_, the :command:`ctest_submit` command runs this step.
  628. Arguments to the command may specify some of the step settings.
  629. Configuration settings include:
  630. ``BuildName``
  631. Describe the dashboard client platform with a short string.
  632. (Operating system, compiler, etc.)
  633. * `CTest Script`_ variable: :variable:`CTEST_BUILD_NAME`
  634. * :module:`CTest` module variable: ``BUILDNAME``
  635. ``CDashVersion``
  636. Specify the version of `CDash`_ on the server.
  637. * `CTest Script`_ variable: none, detected from server
  638. * :module:`CTest` module variable: ``CTEST_CDASH_VERSION``
  639. ``CTestSubmitRetryCount``
  640. Specify a number of attempts to retry submission on network failure.
  641. * `CTest Script`_ variable: none,
  642. use the :command:`ctest_submit` ``RETRY_COUNT`` option.
  643. * :module:`CTest` module variable: ``CTEST_SUBMIT_RETRY_COUNT``
  644. ``CTestSubmitRetryDelay``
  645. Specify a delay before retrying submission on network failure.
  646. * `CTest Script`_ variable: none,
  647. use the :command:`ctest_submit` ``RETRY_DELAY`` option.
  648. * :module:`CTest` module variable: ``CTEST_SUBMIT_RETRY_DELAY``
  649. ``CurlOptions``
  650. Specify a semicolon-separated list of options to control the
  651. Curl library that CTest uses internally to connect to the
  652. server. Possible options are ``CURLOPT_SSL_VERIFYPEER_OFF``
  653. and ``CURLOPT_SSL_VERIFYHOST_OFF``.
  654. * `CTest Script`_ variable: :variable:`CTEST_CURL_OPTIONS`
  655. * :module:`CTest` module variable: ``CTEST_CURL_OPTIONS``
  656. ``DropLocation``
  657. The path on the dashboard server to send the submission.
  658. * `CTest Script`_ variable: :variable:`CTEST_DROP_LOCATION`
  659. * :module:`CTest` module variable: ``DROP_LOCATION`` if set,
  660. else ``CTEST_DROP_LOCATION``
  661. ``DropMethod``
  662. Specify the method by which results should be submitted to the
  663. dashboard server. The value may be ``cp``, ``ftp``, ``http``,
  664. ``https``, ``scp``, or ``xmlrpc`` (if CMake was built with
  665. support for it).
  666. * `CTest Script`_ variable: :variable:`CTEST_DROP_METHOD`
  667. * :module:`CTest` module variable: ``DROP_METHOD`` if set,
  668. else ``CTEST_DROP_METHOD``
  669. ``DropSite``
  670. The dashboard server name
  671. (for ``ftp``, ``http``, and ``https``, ``scp``, and ``xmlrpc``).
  672. * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE`
  673. * :module:`CTest` module variable: ``DROP_SITE`` if set,
  674. else ``CTEST_DROP_SITE``
  675. ``DropSitePassword``
  676. The dashboard server login password, if any
  677. (for ``ftp``, ``http``, and ``https``).
  678. * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE_PASSWORD`
  679. * :module:`CTest` module variable: ``DROP_SITE_PASSWORD`` if set,
  680. else ``CTEST_DROP_SITE_PASWORD``
  681. ``DropSiteUser``
  682. The dashboard server login user name, if any
  683. (for ``ftp``, ``http``, and ``https``).
  684. * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE_USER`
  685. * :module:`CTest` module variable: ``DROP_SITE_USER`` if set,
  686. else ``CTEST_DROP_SITE_USER``
  687. ``IsCDash``
  688. Specify whether the dashboard server is `CDash`_ or an older
  689. dashboard server implementation requiring ``TriggerSite``.
  690. * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE_CDASH`
  691. * :module:`CTest` module variable: ``CTEST_DROP_SITE_CDASH``
  692. ``ScpCommand``
  693. ``scp`` command-line tool to use when ``DropMethod`` is ``scp``.
  694. * `CTest Script`_ variable: :variable:`CTEST_SCP_COMMAND`
  695. * :module:`CTest` module variable: ``SCPCOMMAND``
  696. ``Site``
  697. Describe the dashboard client host site with a short string.
  698. (Hostname, domain, etc.)
  699. * `CTest Script`_ variable: :variable:`CTEST_SITE`
  700. * :module:`CTest` module variable: ``SITE``,
  701. initialized by the :command:`site_name` command
  702. ``TriggerSite``
  703. Legacy option to support older dashboard server implementations.
  704. Not used when ``IsCDash`` is true.
  705. * `CTest Script`_ variable: :variable:`CTEST_TRIGGER_SITE`
  706. * :module:`CTest` module variable: ``TRIGGER_SITE`` if set,
  707. else ``CTEST_TRIGGER_SITE``
  708. See Also
  709. ========
  710. .. include:: LINKS.txt