ctest.1.rst 32 KB

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