runtime_configuration.qbk 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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:runtime_config Runtime parameters]
  8. [h4 Boost.Test runtime parameters]
  9. The __UTF__ supports multiple parameters that affect test module execution. To set the parameter's value you can
  10. either use a runtime configuration subsystem interface from within the test module initialization function or you can
  11. specify the value at runtime during test module invocation.
  12. The __UTF__ provides two ways to set a parameter at runtime: by specifying a command line argument and by setting an
  13. environment variable. The command line argument always overrides the corresponding environment variable.
  14. During test module initialization the __UTF__ parses the command line and excludes all parameters that belong to it and
  15. their values from the argument list. The rest of command line is forwarded to the test module initialization function
  16. supplied by you. The command line argument format expected by the __UTF__ is:
  17. [pre
  18. --<command_line_argument_name>=<argument_value>
  19. ]
  20. The command line argument name is case sensitive. It is required to match exactly the name in parameter specification.
  21. There should not be any spaces between '=' and either command line argument name or argument value.
  22. The corresponding environment variable name is also case sensitive and is required to exactly match the name in the
  23. parameter specification.
  24. All information about the currently supported parameters of the __UTF__ is summarized in
  25. the section [link boost_test.runtime_config.summary].
  26. [h4 Test filtering]
  27. The __UTF__ provides an extensive filtering facility making it easy to run a specific test or a subset of tests. The
  28. [link boost_test.runtime_config.test_unit_filtering section on filtering] gives all the details for the command line interface.
  29. Additionally, [link boost_test.tests_organization.test_tree.test_suite test-suites] and [link boost_test.tests_organization.tests_grouping labels]
  30. may be used in order to construct subset of tests in an efficient and easy way, while decorators
  31. (eg. __decorator_disabled__, __decorator_precondition__) can be used to set the default run status of a test case.
  32. [h4 Custom runtime parameters]
  33. It is possible to extend further the command line interface by providing a custom command line interpretation logic. There are several
  34. ways on how to integrate this logic in the __UTF__ and this is explained in details in the section
  35. [link boost_test.runtime_config.custom_command_line_arguments Custom runtime parameters].
  36. [include test_unit_filtering.qbk]
  37. [include runtime_custom.qbk]
  38. [include runtime_config_summary.qbk]
  39. [endsect] [/ runtime configuration]