ctest.1.rst 35 KB

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