ctest.1.rst 33 KB

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