runtime_config_reference.qbk 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. [/
  2. / Copyright (c) 2003 Boost.Test contributors
  3. /
  4. / Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. /]
  7. [section:rt_param_reference Runtime parameters reference]
  8. Following sections provide detailed specification for all __UTF__ runtime parameters. Each parameter specification includes:
  9. * The full parameter name.
  10. * Description of parameter semantic and default value.
  11. * Acceptable argument values. The default value for the parameter is bold in the acceptable values list.
  12. * Command line syntax. The format of all command line arguments is: `<prefix><name>[<separator><value>]`.
  13. For example: `--param=<value>`.
  14. `[]` around separator and value indicate that argument value is optional. For example: `-q[ <value>]`.
  15. * Corresponding environment variable name.
  16. [note All command line argument formats support parameter name guessing. What this means is that is if command like
  17. format is like this:
  18. [pre --long_parameter_name=<value>]
  19. you can in fact use any unambiguous prefix of the parameter name to specify the argument. For example:
  20. [pre --long_param=123]
  21. or
  22. [pre --long_p=123.]
  23. If parameter name prefix you chose is ambiguous the framework lets you know which parameters match specified
  24. prefix. For example, try
  25. [pre --log=all]
  26. ]
  27. [h4 Parameter value formats]
  28. The __UTF__ runtime parameters take value of the following types: string, boolean, enumeration,
  29. unsigned, long. Formats required for values of these types are following:
  30. [h5 String, unsigned, long][#regular_param_value]
  31. Values of these types are expected in the same format they are represented in C++.
  32. [h5 Boolean][#boolean_param_value]
  33. Values of these types are options with yes/no or true/false meaning. True values are represented
  34. by case insensitive strings: "Y", "YES", "TRUE", "1". False values are represented by case
  35. insensitive strings: "N", "NO", "FALSE", "0".
  36. [h5 Enumeration][#enum_param_value]
  37. Values of an enumeration type are expected as case sensitive strings representing
  38. enumeration value names. Each parameter with an enumeration value lists all valid names in a
  39. parameter`s description.
  40. [/ ###############################################################################################]
  41. [section:auto_dbg `auto_start_dbg`]
  42. Option ['auto_start_dbg] specifies whether Boost.Test should attempt to attach a debugger when a fatal system
  43. error occurs. At the moment this feature is only available on a few selected platforms: Win32 and *nix. There is a
  44. default debugger configured for these platforms. You can manually configure a different debugger.
  45. For more details on how to configure a debugger see the [headerref boost/test/debug.hpp Boost.Test debug API],
  46. specifically the function [funcref boost::debug::set_debugger].
  47. [h4 Acceptable values]
  48. [link boolean_param_value Boolean] with default value [*no].
  49. [h4 Command line syntax]
  50. * `--auto_debug[=<boolean value>]`
  51. * `-d [<boolean value>]`
  52. [h4 Environment variable]
  53. BOOST_TEST_AUTO_START_DBG
  54. [endsect] [/auto_start_dbg]
  55. [/ ###############################################################################################]
  56. [section:build_info `build_info`]
  57. Option ['build_info] instructs the __UTF__ to display the build information before testing begins.
  58. This information includes:
  59. * platform
  60. * compiler
  61. * STL implementation in use
  62. * boost version
  63. [h4 Acceptable values]
  64. [link boolean_param_value Boolean] with default value [*no].
  65. [h4 Command line syntax]
  66. * `--build_info[=<boolean value>]`
  67. * `-i [<boolean value>]`
  68. [h4 Environment variable]
  69. BOOST_TEST_BUILD_INFO
  70. [endsect] [/ build_info]
  71. [/ ###############################################################################################]
  72. [section:catch_system `catch_system_errors`]
  73. If option ['catch_system_errors] has value "no" the __UTF__ does not attempt to catch asynchronous system failures
  74. (signals on *NIX platforms or structured exceptions on Windows). This can be used for test programs executed
  75. within an IDE or to get a coredump for a stack analysis. See
  76. [link ref_usage_recommendations usage recommendations] pages for more details.
  77. [h4 Acceptable values]
  78. [link boolean_param_value Boolean] with default value [*no].
  79. [note The __UTF__ can be built with flag `BOOST_TEST_DEFAULTS_TO_CORE_DUMP` in which case default changes to [*yes]]
  80. [h4 Command line syntax]
  81. * `--catch_system_errors[=<boolean value>]`
  82. * `-s [<boolean value>]`
  83. [h4 Environment variable]
  84. BOOST_TEST_CATCH_SYSTEM_ERRORS
  85. [endsect] [/catch_system_errors]
  86. [/ ###############################################################################################]
  87. [section:color_output `color_output`]
  88. The __UTF__ is able to produce color output on systems which support it. To disable this behavior, set this option to
  89. `no`. By default the framework produces color output.
  90. [h4 Acceptable values]
  91. [link boolean_param_value Boolean] with default value [*yes].
  92. [h4 Command line syntax]
  93. * `--color_output[=<boolean value>]`
  94. * `-x [<boolean value>]`
  95. [h4 Environment variable]
  96. BOOST_TEST_COLOR_OUTPUT
  97. [endsect] [/color_output]
  98. [/ ###############################################################################################]
  99. [section:detect_fp_exceptions `detect_fp_exceptions`]
  100. Option ['build_info] enables/disables hardware traps for the floating point exceptions (if supported on your platform).
  101. [h4 Acceptable values]
  102. [link boolean_param_value Boolean] with default value [*no].
  103. [h4 Command line syntax]
  104. * `--detect_fp_exceptions[=<boolean value>]`
  105. [h4 Environment variable]
  106. BOOST_TEST_DETECT_FP_EXCEPTIONS
  107. [endsect] [/detect_fp_exceptions]
  108. [/ ###############################################################################################]
  109. [section:detect_memory_leaks `detect_memory_leaks`]
  110. Parameter ['detect_memory_leaks] enables/disables memory leaks detection (if present in your build configuration).
  111. This parameter has an optional long integer value. The default value is 1, which enables memory leak detection.
  112. The value 0 disables memory leak detection. Any value N greater than 1 is treated as leak allocation number and tells the
  113. framework to setup runtime breakpoint at Nth heap allocation. If value is omitted the default value is assumed.
  114. [note The only platform which supports memory leak detection is Microsoft Visual Studio family of compilers in debug builds.]
  115. [h4 Acceptable values]
  116. * 0
  117. * [*1] (default)
  118. * [link regular_param_value long integer value] > 1
  119. [h4 Command line syntax]
  120. * `--detect_memory_leaks[=<alloc order number>]`
  121. [h4 Environment variable]
  122. BOOST_TEST_DETECT_MEMORY_LEAK
  123. [endsect] [/detect_memory_leaks]
  124. [/ ###############################################################################################]
  125. [section:help `help`]
  126. Parameter ['help] displays help on the framework's parameters. The parameter accepts an optional
  127. argument value:
  128. * if present, the argument value is interpreted as a parameter name. Name guessing
  129. works as well (so for example `--help=rand` displays help on the parameter `random`).
  130. * if the parameter name is unknown or ambiguous, an error is reported,
  131. * if the argument value is absent, a summary of all framework's parameter is displayed.
  132. [h4 Acceptable values]
  133. An optional parameter name [link regular_param_value string].
  134. [h4 Command line syntax]
  135. * `--help[=<parameter name>]`
  136. [endsect] [/help]
  137. [/ ###############################################################################################]
  138. [section:list_content `list_content`]
  139. Lists the name of the [link ref_test_unit test units] contained in the [link ref_test_module test module] and exits (no test is run).
  140. This command line parameter accepts an /optional/ string value indicating the format of the output.
  141. The framework supports the following two formats:
  142. # HRF (default), standing for /Human Readable Format/,
  143. # DOT, standing for the [@http://www.graphviz.org/doc/info/lang.html Graphviz graph format]. This format may be automatically parsed or rendered.
  144. [h4 HRF]
  145. For HRF, the [link ref_test_tree test tree] (test suites and test cases) is presented in a tree like form with
  146. each test unit name on a separate line with horizontal indentation in relation to the parent test suite.
  147. In addition, test units which are enabled by default have an asterisk `*` next to the test unit name. For example, the following output:
  148. testsuite1*
  149. testcase1*
  150. testcase2
  151. testsuite2*
  152. testcase3*
  153. represents test module consisting of two test suites: `testsuite1` and `testsuite2`, and three test cases: `testcase1`,
  154. `testcase2`, and `testcase3`. The formatting reflects the test-tree: the first two test cases belong to the first test suite
  155. and last one belongs to the second. Out of three test cases only two are enabled by default:
  156. `testcase1` and `testcase3`. `testcase2` is not enabled by default, but can be enabled by using the parameter __param_run_test__.
  157. [h4 DOT]
  158. DOT output generates a graph representing the module's [link ref_test_tree test tree] in a
  159. [@http://www.graphviz.org/doc/info/lang.html dot format].
  160. This output includes much more information about the test tree including labels, timeouts, expected failures, and dependencies.
  161. The legend is as follow:
  162. * the master test suite is represented as an ellipse
  163. * a test unit (suite, case) is in a rounded rectangle
  164. * test unit declaration location, [link boost_test.tests_organization.tests_grouping labels],
  165. [link boost_test.testing_tools.expected_failures expected failures], [link boost_test.testing_tools.timeout timeouts] are appended,
  166. * a green box indicates that the test unit that is enabled, otherwise its color is yellow,
  167. * a plain black arrow goes from a test unit to each of its children, following the test tree (the arrow pointing to the child),
  168. * a dashed red arrow indicates a runtime dependence on test units, the arrow pointing to the parent in the dependency graph.
  169. [h4 Acceptable values]
  170. [link enum_param_value Enumeration] names:
  171. * [*HRF] (default)
  172. * DOT
  173. [h4 Command line syntax]
  174. * `--list_content[=<format>]`
  175. [h4 Environment variable]
  176. BOOST_TEST_LIST_CONTENT
  177. [h4 Example]
  178. The following /deliberately/ complicated example illustrates the purpose of the `--list_content`
  179. directive. The SVG generated from the produced Graphviz/dot file can be downloaded
  180. [@images/boost_runtime_list_content.svg here].
  181. [bt_example boost_runtime_list_content..`--list_content` illustration..run]
  182. [$images/boost_runtime_list_content.png [width 70%]]
  183. [endsect] [/list_content]
  184. [/ ###############################################################################################]
  185. [section:list_labels `list_labels`]
  186. Lists the labels associated to the [link ref_test_unit test units] in the current
  187. [link ref_test_module test module] and exits (no test is run).
  188. [tip
  189. See [link boost_test.tests_organization.tests_grouping this section] for more details on labels and logical grouping
  190. of test cases.
  191. ]
  192. [h4 Acceptable values]
  193. [link boolean_param_value Boolean] with default value [*no].
  194. [h4 Command line syntax]
  195. * `--list_labels[=<boolean value>]`
  196. [h4 Environment variable]
  197. BOOST_TEST_LIST_LABELS
  198. [h4 Example]
  199. The previous example from [link boost_test.utf_reference.rt_param_reference.list_content `--list_content`] gives
  200. ```
  201. > ./boost_runtime_list_content --list_labels
  202. Available labels:
  203. label1
  204. label2
  205. ```
  206. [endsect] [/list_labels]
  207. [/ ###############################################################################################]
  208. [section:log_format `log_format`]
  209. Parameter ['log_format] allows to set the __UTF__ log format to one of the formats supplied by the framework.
  210. To specify custom log format use the [link ref_log_formatter_api custom log formatting API].
  211. The only acceptable values for this parameter are the names of the output formats supplied by the
  212. framework. By default the framework uses human readable format (HRF) for the testing log. This format
  213. is similar to a compiler error format. Alternatively you can specify XML or JUNIT as a log format which are
  214. easier to process by testing automation tools.
  215. [h4 Acceptable values]
  216. [link enum_param_value Enumeration] names:
  217. * [*HRF] (default)
  218. * XML
  219. * JUNIT
  220. [h4 Command line syntax]
  221. * `--log_format=<format>`
  222. * `-f <format>`
  223. [h4 Environment variable]
  224. BOOST_TEST_LOG_FORMAT
  225. [endsect] [/log_format]
  226. [/ ###############################################################################################]
  227. [section:log_level `log_level`]
  228. Parameter ['log_level] allows to set the __UTF__ [link ref_log_level_explanations log level]. Log level defines
  229. the verbosity of the testing log produced by a testing module. The verbosity ranges from a complete log, when all
  230. assertions (both successful and failing) are reported and all notifications about test units start and finish
  231. are included, to an empty log, when nothing is reported to a testing log stream.
  232. Log level is set to one of the predefined levels which are organized hierarchically, where each level includes
  233. all the messages on that level as well as all the messages from levels below. Levels are identified by string
  234. names, which are listed next.
  235. [h4 Acceptable values]
  236. Following is the list of [link enum_param_value enumeration] log_level names ordered from higher to lower level.
  237. Thus each level includes messages on that level as well as all the messages on levels defined below.
  238. [table
  239. [
  240. [Value]
  241. [Included messages]
  242. ]
  243. [
  244. [all (default for JUNIT)]
  245. [All log messages including the passed assertions notification]
  246. ]
  247. [
  248. [success]
  249. [The same as all]
  250. ]
  251. [
  252. [test_suite]
  253. [Test units start/finish notifications]
  254. ]
  255. [
  256. [message]
  257. [User generated messages (using __BOOST_TEST_MESSAGE__ tool)]
  258. ]
  259. [
  260. [warning]
  261. [Messages describing failed assertion on `WARN` level (
  262. [link boost_test.utf_reference.testing_tool_ref.assertion_boost_test_universal_macro `BOOST_TEST_WARN`]
  263. / `BOOST_WARN_...`
  264. tools)]
  265. ]
  266. [
  267. [[*error] (default for HRF and XML)]
  268. [Messages describing failed assertion on `CHECK` level (__BOOST_TEST__ / `BOOST_CHECK_...` tools)]
  269. ]
  270. [
  271. [cpp_exception]
  272. [Messages reporting uncaught C++ exception]
  273. ]
  274. [
  275. [system_error]
  276. [Messages reporting system originated non-fatal errors. For example, timeout or floating point exception.]
  277. ]
  278. [
  279. [fatal_error]
  280. [Messages reporting user or system originated fatal errors. For example, memory access violation. Also
  281. all the messages describing failed assertion on `REQUIRE` level (__BOOST_TEST_REQUIRE__ / `BOOST_REQUIRE_...` tools)]
  282. ]
  283. [
  284. [nothing]
  285. [No messages are reported.]
  286. ]
  287. ]
  288. [caution the JUNIT log format does not accept the log level to change: anything specified by `log_level` will be ignored
  289. for the JUNIT format.]
  290. [h4 Command line syntax]
  291. * `--log_level=<level>`
  292. * `-l <level>`
  293. [h4 Environment variable]
  294. BOOST_TEST_LOG_LEVEL
  295. [endsect] [/log_level]
  296. [/ ###############################################################################################]
  297. [section:log_sink `log_sink`]
  298. Parameter ['log_sink] allows to set the log sink - location where framework writes the testing log to,
  299. thus it allows to easily redirect the testing log to file or standard streams. By default testing log
  300. is directed to the standard output stream.
  301. [h4 Acceptable values]
  302. Case sensitive [link regular_param_value string]:
  303. [table
  304. [
  305. [Value]
  306. [Meaning]
  307. ]
  308. [
  309. [[*`stdout`] (default for HRF and XML)]
  310. [Testing log is redirected into standard output stream]
  311. ]
  312. [
  313. [stderr]
  314. [Testing log is redirected into standard error stream]
  315. ]
  316. [
  317. [File name (default for JUNIT)]
  318. [Testing log is redirected into this file]
  319. ]
  320. ]
  321. [note For JUnit and if not specified, the log file is generated after the name of the
  322. [link boost_test.tests_organization.test_tree.master_test_suite master test suite].]
  323. [h4 Command line syntax]
  324. * `--log_sink=<stream or file name>`
  325. * `-k <stream or file name>`
  326. [h4 Environment variable]
  327. BOOST_TEST_LOG_SINK
  328. [endsect] [/log_sink]
  329. [/ ###############################################################################################]
  330. [section:logger `logger`]
  331. The ['logger] parameter allows to fully specify (log format, level and sink) one or several loggers in one command.
  332. If this parameter is specified, it has precedence over [link boost_test.utf_reference.rt_param_reference.log_format `log_format`],
  333. [link boost_test.utf_reference.rt_param_reference.log_level `log_level`] and [link boost_test.utf_reference.rt_param_reference.log_sink `log_sink`].
  334. The parameter is /repeatable/: it may appear several times on the command line. It is possible to indicate a set of loggers using the separator ':',
  335. which is the only way for repeating a logger description through the environment variable.
  336. The parameter is composed of three fields separated by a coma ',' and indicating respectively the log format, level and sink. The log
  337. format is mandatory. The log level and sink are both optional: if omitted, the default for the specified format will
  338. be used. The log level and sink accept the same value as their respective command line switch (see
  339. [link boost_test.utf_reference.rt_param_reference.log_level `log_level`] and [link boost_test.utf_reference.rt_param_reference.log_sink `log_sink`]
  340. for more information).
  341. [h4 Acceptable values]
  342. Case sensitive [link regular_param_value string]:
  343. ```
  344. logger_set ::= (logger ':')* logger
  345. logger ::= logger_format (',' log_level? (',' log_sink? )? )?
  346. logger_format ::= 'HRF' | 'XML' | 'JUNIT'
  347. log_level ::= 'all' | 'success' | 'test_suite' | 'message' | 'warning' | 'error' | 'cpp_exception' | 'system_error' | 'fatal_error' | 'nothing'
  348. log_sink ::= 'stdout' | 'stderr' | filename
  349. ```
  350. Examples:
  351. * `--logger=HRF,all` will set the `all` log level for the `HRF` log format, and will use the default sink associated to `HRF` (`stdout`)
  352. * `--logger=JUNIT,,somefile.xml:HRF,warning` will use the default log level associated to the `JUNIT` log format, and will use the file `somefile.xml`
  353. as the log sink. It will also enable the `HRF` format with log level `warning`. The corresponding sink will be set to the `HRF` default (`stdout`).
  354. [h4 Command line syntax]
  355. * `--logger=<logger_set>`
  356. [h4 Environment variable]
  357. BOOST_TEST_LOGGER
  358. [endsect] [/logger]
  359. [/ ###############################################################################################]
  360. [section:output_format `output_format`]
  361. Parameter ['output_format] combines an effect of
  362. [link boost_test.utf_reference.rt_param_reference.report_format `report_format`] and
  363. [link boost_test.utf_reference.rt_param_reference.log_format `log_format`]
  364. parameters. This parameter does not have
  365. a default value. The only acceptable values are string names of output formats (see below).
  366. [note This parameter has precedence over ['report_format] and ['log_format] on the command line. ]
  367. [h4 Acceptable values]
  368. [link enum_param_value Enumeration] name:
  369. * HRF
  370. * XML
  371. ['HRF] stands for human readable format, while ['XML] is dedicated to automated output processing
  372. [h4 Command line syntax]
  373. * `--output_format=<format>`
  374. * `-o <format>`
  375. [h4 Environment variable]
  376. BOOST_TEST_OUTPUT_FORMAT
  377. [endsect] [/output_format]
  378. [/ ###############################################################################################]
  379. [section:random `random`]
  380. Parameter ['random] instructs the __UTF__ to execute the test cases in random order. This parameter
  381. accepts an optional `unsigned integer` argument for the seed of the random generator:
  382. * By default (value `0`), the test cases are executed in some specific order
  383. defined by the order of test units in the test files, and the dependencies between test units.
  384. * If the parameter is specified without the argument value, or with value `1`, the testing order is randomized based on current time.
  385. * Alternatively, any positive value greater than `1` will be used as random seed for the run.
  386. [tip in case `--random` is specified, the value of the seed is logged using __BOOST_TEST_MESSAGE__, so that it is possible to replay
  387. exactly the same sequence of unit test in case of failure. For the seed to be visible in the logs,
  388. make sure the proper [link boost_test.utf_reference.rt_param_reference.log_level `--log_level`] is set.
  389. ]
  390. [h4 Acceptable values]
  391. * [*0] (default): no randomization
  392. * `1`: random seed based on the current time
  393. * [link regular_param_value integer] `value > 1` : seed for the random number generator
  394. [h4 Command line syntax]
  395. * `--random=<seed>`
  396. [h4 Environment variable]
  397. BOOST_TEST_RANDOM
  398. [endsect] [/random]
  399. [/ ###############################################################################################]
  400. [section:report_format `report_format`]
  401. Parameter ['report_format] allows to set the __UTF__ report format to one of the formats supplied
  402. by the framework. To specify a custom report format use unit_test_report API.
  403. The only acceptable values for this parameter are the names of the output formats. By default the
  404. framework uses human readable format (HRF) for results reporting. Alternatively you can specify
  405. XML as report format. This format is easier to process by testing automation tools.
  406. [h4 Acceptable values]
  407. [link enum_param_value Enumeration] names:
  408. * [*HRF] (default)
  409. * XML
  410. [h4 Command line syntax]
  411. * `--report_format=<format>`
  412. * `-m <format>`
  413. [h4 Environment variable]
  414. BOOST_TEST_REPORT_FORMAT
  415. [endsect] [/report_format]
  416. [/ ###############################################################################################]
  417. [section:report_level `report_level`]
  418. Parameter ['report_level] allows to set the verbosity level of the testing result report generated by
  419. the __UTF__. Use value "no" to eliminate the results report completely. See the
  420. [link ref_report_formats report formats] section for description of report formats on different levels.
  421. [h4 Acceptable values]
  422. [link enum_param_value Enumeration] report_level names:
  423. * [*confirm] (default)
  424. * no
  425. * short
  426. * detailed
  427. [h4 Command line syntax]
  428. * `--report_level=<format>`
  429. * `-r <format>`
  430. [h4 Environment variable]
  431. BOOST_TEST_REPORT_LEVEL
  432. [endsect] [/report_level]
  433. [/ ###############################################################################################]
  434. [section:report_memory_leaks_to `report_memory_leaks_to`]
  435. Parameter ['report_memory_leaks_to] allows to specify a file where to report memory leaks to. The
  436. parameter does not have default value. If it is not specified, memory leaks (if any) are reported
  437. to the standard error stream.
  438. [h4 Acceptable values]
  439. Arbitrary file name [link regular_param_value string].
  440. [h4 Command line syntax]
  441. * `--report_memory_leaks_to=<file name>`
  442. [h4 Environment variable]
  443. BOOST_TEST_REPORT_MEMORY_LEAKS_TO
  444. [endsect] [/report_sink]
  445. [/ ###############################################################################################]
  446. [section:report_sink `report_sink`]
  447. Parameter ['report_sink] allows to set the result report sink - the location where the framework writes
  448. the result report to, thus it allows to easily redirect the result report to a file or a standard stream.
  449. By default the testing result report is directed to the standard error stream.
  450. [h4 Acceptable values]
  451. Case sensitive [link regular_param_value string]:
  452. * [*`stderr`] (default)
  453. * `stdout`
  454. * arbitrary file name
  455. [h4 Command line syntax]
  456. * `--report_sink=<stream or file name>`
  457. * `-e <stream or file name>`
  458. [h4 Environment variable]
  459. BOOST_TEST_REPORT_SINK
  460. [endsect] [/report_sink]
  461. [/ ###############################################################################################]
  462. [section:result_code `result_code`]
  463. The "no" argument value for the option [`result_code] instructs the __UTF__ to always return zero
  464. result code. This could be used for test programs executed within IDE. By default this parameter has
  465. value "yes". See the [link ref_usage_recommendations usage recommendations] section for more details.
  466. [h4 Acceptable values]
  467. [link boolean_param_value Boolean] with default value [*yes].
  468. [h4 Command line syntax]
  469. * `--result_code[=<boolean value>]`
  470. * `-c [<boolean value>]`
  471. [h4 Environment variable]
  472. BOOST_TEST_RESULT_CODE
  473. [endsect] [/result_code]
  474. [/ ###############################################################################################]
  475. [section:run_test `run_test`]
  476. Parameter ['run_test] allows to filter which test units to execute during testing. The __UTF__ supports
  477. both "selection filters", which allow to select which test units to enable from the set of available
  478. test units, and "disabler filters", which allow to disable some test units. The __UTF__ also supports
  479. enabling/disabling test units at compile time. These settings identify the default set of test units
  480. to run. Parameter ['run_test] is used to change this default. This parameter is repeatable, so you can
  481. specify more than one filter if necessary.
  482. It is also possible to use the ':' for separating each filter
  483. which can be used for filtering the tests with the environment variable `BOOST_TEST_RUN_FILTERS` (as it cannot be
  484. repeated like `--run_test`).
  485. More details about practical application of this parameter resides in [link boost_test.runtime_config.test_unit_filtering test unit
  486. filtering] section.
  487. [h4 Acceptable values]
  488. [link regular_param_value String] value representing single filter or a set of filters separated by ':'.
  489. The following grammar productions describe the syntax of filters:
  490. ```
  491. filter_set ::= (filter ':')* filter
  492. filter ::= relative_spec? test_set
  493. relative_spec ::= '+' | '!'
  494. test_set ::= label | path
  495. label ::= '@' identifier
  496. path ::= (suite '/')? pattern_list
  497. pattern_list ::= (pattern ',')* pattern
  498. suite ::= (pattern '/')* pattern
  499. pattern ::= '*'? identifier '*'?
  500. ```
  501. [caution the `pattern_list` above indicates test unit inside the same test suite given by `suite`. This means that the syntax
  502. "`--run_test=suite1/suite2/A,B,C`" runs the test cases `A`, `B` and `C` that are *inside* `suite1/suite2`. In order to indicate
  503. several test units that are not siblings, either repeat the `--run_test` or use `:` to separate the filters.]
  504. Regarding the meaning of these values [link ref_command_line_control see here].
  505. [h4 Command line syntax]
  506. * `--run_test=<test unit filter spec>`
  507. * `-t <test unit filter spec>`
  508. [h4 Environment variable]
  509. BOOST_TEST_RUN_FILTERS
  510. [endsect] [/run_test]
  511. [/ ###############################################################################################]
  512. [section:save_pattern `save_pattern`]
  513. Option ['save_pattern] facilitates switching mode of operation for testing output streams. See __output_test_stream_tool__
  514. section for details on these tests.
  515. This parameter serves no particular purpose within the framework itself. It can be used by test modules relying
  516. on [classref boost::test_tools::output_test_stream] to implement testing logic. It has two modes of operation:
  517. * save the pattern file (true).
  518. * and match against a previously stored pattern file (false).
  519. Default mode is 'match' (false).
  520. You can use this parameter to switch between these modes, by passing the parameter value to the `output_test_stream` constructor.
  521. The value of the command line parameter is available using call like this:
  522. ``
  523. bool is_save_pattern_flag_set = boost::unit_test::runtime_config::save_pattern();
  524. ``
  525. [h4 Acceptable values]
  526. [link boolean_param_value Boolean] with default value [*no].
  527. [h4 Command line syntax]
  528. * `--save_pattern[=<boolean value>]`
  529. [h4 Environment variable]
  530. BOOST_TEST_SAVE_PATTERN
  531. [endsect] [/save_pattern]
  532. [/ ###############################################################################################]
  533. [section:show_progress `show_progress`]
  534. Option ['show_progress] instructs the __UTF__ to display test progress information. By default the
  535. parameter test progress is not shown. More details [link boost_test.test_output.test_output_progress here].
  536. [h4 Acceptable values]
  537. [link boolean_param_value Boolean] with default value [*no].
  538. [h4 Command line syntax]
  539. * `--show_progress[=<boolean value>]`
  540. * `-p [<boolean value>]`
  541. [h4 Environment variable]
  542. BOOST_TEST_SHOW_PROGRESS
  543. [endsect]
  544. [/ ###############################################################################################]
  545. [section:use_alt_stack `use_alt_stack`]
  546. Option ['use_alt_stack] instructs the __UTF__ to use alternative stack for signals processing, on
  547. platforms where they are supported. More information about this feature is available
  548. [@http://www.gnu.org/software/libc/manual/html_node/Signal-Stack.html here]. The feature is enabled
  549. by default, but can be disabled using this parameter.
  550. [/ TODO indicate which platforms are supported]
  551. [/ TODO add a link to the execution monitor]
  552. [note If this feature is not supported by your compiler, this command line option will be silently ignored.]
  553. [note it is possible to remove the support of the alternative stack with the macro
  554. [link boost_test.utf_reference.link_references.config_disable_alt_stack `BOOST_TEST_DISABLE_ALT_STACK`]]
  555. [h4 Acceptable values]
  556. [link boolean_param_value Boolean] with default value [*yes].
  557. [h4 Command line syntax]
  558. * `--use_alt_stack[=<boolean value>]`
  559. [h4 Environment variable]
  560. BOOST_TEST_USE_ALT_STACK
  561. [endsect] [/use_alt_stack]
  562. [/ ###############################################################################################]
  563. [section:usage `usage`]
  564. If specified option ['usage] instructs the __UTF__ to displays short usage message about the
  565. framework's parameters.
  566. [h4 Command line syntax]
  567. * `-? [<boolean value>]`
  568. [note The parameter name is not part of command line format, only short '-?'.]
  569. [h4 Acceptable values]
  570. [link boolean_param_value Boolean] with default value [*no].
  571. [endsect] [/usage]
  572. [/ ###############################################################################################]
  573. [section:wait_for_debugger `wait_for_debugger`]
  574. Option ['wait_for_debugger] instructs the __UTF__ to pause before starting test units execution,
  575. so that you can attach a debugger to running test module. By default this parameters turned off.
  576. [h4 Acceptable values]
  577. [link boolean_param_value Boolean] with default value [*no].
  578. [h4 Command line syntax]
  579. * `--wait_for_debugger[=<boolean value>]`
  580. * `-w [<boolean value>]`
  581. [h4 Environment variable]
  582. BOOST_TEST_WAIT_FOR_DEBUGGER
  583. [endsect] [/wait_for_debugger]
  584. [endsect] [/ runtime parameters reference]